diff --git a/PackagesList.cmake b/PackagesList.cmake
index 1a0f15b870c0..70dd6441a763 100644
--- a/PackagesList.cmake
+++ b/PackagesList.cmake
@@ -102,7 +102,6 @@ TRIBITS_REPOSITORY_DEFINE_PACKAGES(
ShyLU_Node packages/shylu/shylu_node PT
Amesos2 packages/amesos2 PT
SEACAS packages/seacas PT # Depends on netcdf, optionally hdf5, xdmf, pamgen
- Trios packages/trios EX #temporary
Komplex packages/komplex ST
Anasazi packages/anasazi PT
Ifpack2 packages/ifpack2 PT
@@ -138,7 +137,6 @@ TRIBITS_REPOSITORY_DEFINE_PACKAGES(
WebTrilinos packages/WebTrilinos EX # Should be ST
NewPackage packages/new_package EX # Should be ST
Optika packages/optika EX
- Mesquite packages/mesquite ST
TrilinosCouplings packages/trilinoscouplings PT
Pike packages/pike PT
xSDKTrilinos packages/xSDKTrilinos ST
@@ -192,6 +190,4 @@ TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Anasazi Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Isorropia Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Zoltan Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Teko Windows)
-TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Mesquite AIX)
-TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Trios Windows)
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Panzer Windows)
diff --git a/cmake/ctest/drivers/trilinos-test2/nightly_create_tarball.py b/cmake/ctest/drivers/trilinos-test2/nightly_create_tarball.py
index 3e50409db0d0..847513068395 100755
--- a/cmake/ctest/drivers/trilinos-test2/nightly_create_tarball.py
+++ b/cmake/ctest/drivers/trilinos-test2/nightly_create_tarball.py
@@ -123,7 +123,6 @@
("TriKota", False),
("TrilinosCouplings", True),
("TrilinosFramework", False),
- ("Trios", False),
("Triutils", True),
("WebTrilinos", False),
("Xpetra", True),
diff --git a/cmake/dependencies/CDashSubprojectDependencies.xml b/cmake/dependencies/CDashSubprojectDependencies.xml
index de482166f137..17a479b744c0 100644
--- a/cmake/dependencies/CDashSubprojectDependencies.xml
+++ b/cmake/dependencies/CDashSubprojectDependencies.xml
@@ -189,11 +189,6 @@
-
-
-
-
-
diff --git a/cmake/dependencies/TrilinosPackageDependencies.xml b/cmake/dependencies/TrilinosPackageDependencies.xml
index 96eb0377d4bf..655c49de8da8 100644
--- a/cmake/dependencies/TrilinosPackageDependencies.xml
+++ b/cmake/dependencies/TrilinosPackageDependencies.xml
@@ -1090,132 +1090,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/cmake/std/atdm/ATDMDisables.cmake b/cmake/std/atdm/ATDMDisables.cmake
index d825544981c8..017aeff74fbc 100644
--- a/cmake/std/atdm/ATDMDisables.cmake
+++ b/cmake/std/atdm/ATDMDisables.cmake
@@ -34,7 +34,6 @@ SET(ATDM_SE_PACKAGE_DISABLES
Domi
Pliris
Komplex
- Trios
FEI
TriKota
STKClassic
diff --git a/commonTools/git/hooks/Trilinos/dirs_to_emails b/commonTools/git/hooks/Trilinos/dirs_to_emails
index 66f933f3cfb2..3feb39b417eb 100644
--- a/commonTools/git/hooks/Trilinos/dirs_to_emails
+++ b/commonTools/git/hooks/Trilinos/dirs_to_emails
@@ -60,7 +60,6 @@ packages/phdmesh phdmesh-checkins@software.sandia.gov
packages/intrepid intrepid-checkins@software.sandia.gov
packages/shards shards-checkins@software.sandia.gov
packages/stk stk-checkins@software.sandia.gov
-packages/trios trios-checkins@software.sandia.gov
packages/seacas seacas-checkins@software.sandia.gov
packages/teko teko-checkins@software.sandia.gov
packages/muelu muelu-checkins@software.sandia.gov
diff --git a/commonTools/release/tarball-do-configure b/commonTools/release/tarball-do-configure
index d3c00b73d778..3bcd83243f36 100755
--- a/commonTools/release/tarball-do-configure
+++ b/commonTools/release/tarball-do-configure
@@ -89,7 +89,6 @@ cmake \
-DTrilinos_ENABLE_Tpetra=ON \
-DTrilinos_ENABLE_TriKota=ON \
-DTrilinos_ENABLE_TrilinosCouplings=ON \
--DTrilinos_ENABLE_Trios=ON \
-DTrilinos_ENABLE_Triutils=ON \
-DTrilinos_ENABLE_Zoltan=ON \
-DTrilinos_ENABLE_Zoltan2=ON \
diff --git a/packages/panzer/maintenance/build_panzer_operandi b/packages/panzer/maintenance/build_panzer_operandi
index f15f4b62ec0c..4758e24535ff 100755
--- a/packages/panzer/maintenance/build_panzer_operandi
+++ b/packages/panzer/maintenance/build_panzer_operandi
@@ -26,7 +26,6 @@ cmake \
-D Panzer_STK_ENABLE_TESTS:BOOL=ON \
-D Panzer_STK_ENABLE_EXAMPLES:BOOL=ON \
-D Intrepid2_ENABLE_DEBUG_INF_CHECK=OFF \
--D Trios_ENABLE_XDMF:BOOL=OFF \
-D TPL_ENABLE_MPI:BOOL=ON \
-D MPI_BASE_DIR:PATH="/home/rppawlo/local" \
-D MPIEXEC_MAX_NUMPROCS:STRING=4 \
diff --git a/packages/panzer/maintenance/build_panzer_s924793.sh b/packages/panzer/maintenance/build_panzer_s924793.sh
index f675726b2fd9..d25696e5cd3e 100755
--- a/packages/panzer/maintenance/build_panzer_s924793.sh
+++ b/packages/panzer/maintenance/build_panzer_s924793.sh
@@ -7,7 +7,6 @@ cmake \
-D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON \
-D Trilinos_ENABLE_EXAMPLES:BOOL=OFF \
- -D Trios_ENABLE_XDMF:BOOL=OFF \
-D Trilinos_ENABLE_TESTS:BOOL=OFF \
-D Trilinos_ENABLE_Teko:BOOL=ON \
-D Trilinos_ENABLE_Panzer:BOOL=ON \
diff --git a/packages/trios/.gitignore b/packages/trios/.gitignore
deleted file mode 100644
index 0b67450a4bd2..000000000000
--- a/packages/trios/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.project
-.cproject
-.settings
diff --git a/packages/trios/CMakeLists.txt b/packages/trios/CMakeLists.txt
deleted file mode 100644
index da6a91355ea5..000000000000
--- a/packages/trios/CMakeLists.txt
+++ /dev/null
@@ -1,188 +0,0 @@
-
-# @HEADER
-# ************************************************************************
-#
-# Trios: Trilinos I/O Support
-# Copyright 2011 Sandia Corporation
-#
-# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-# the U.S. Government retains certain rights in this software.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. 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.
-#
-# 3. Neither the name of the Corporation nor the names of the
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-# 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.
-#
-# Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-#
-# *************************************************************************
-# @HEADER
-
-
-###########################################################
-# A) Define the package
-#
-
-TRIBITS_PACKAGE_DECL( Trios ENABLE_SHADOWING_WARNINGS )
-
-# Trios package is deprecated April 2019; to be removed May 2019
-MESSAGE(WARNING "***** WARNING: Package Trios is deprecated in April 2019; it will be removed in May 2019 *****")
-
-TRIBITS_ADD_DEBUG_OPTION()
-
-TRIBITS_ADD_SHOW_DEPRECATED_WARNINGS_OPTION()
-
-
-###########################################################
-# B) Set up package-specific options
-#
-
-set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
-
-IF (NOT CMAKE_HAVE_PTHREAD_H)
- IF (TPL_ENABLE_InfiniBand)
- SET (Trios_ENABLE_InfiniBand OFF)
- SET (Triosnnti_ENABLE_InfiniBand OFF)
- UNSET (HAVE_TRIOS_INFINIBAND)
- UNSET (HAVE_TRIOSNNTI_INFINIBAND)
-
- MESSAGE(WARNING "The Infiniband transport requires Pthreads, but it was disabled or not found.")
- ENDIF ()
-ENDIF ()
-
-# MESSAGE(STATUS "TPL_ENABLE_Pthread==${TPL_ENABLE_Pthread}")
-# MESSAGE(STATUS "TPL_ENABLE_InfiniBand==${TPL_ENABLE_InfiniBand}")
-#
-# MESSAGE(STATUS "Trios_ENABLE_InfiniBand==${Trios_ENABLE_InfiniBand}")
-# MESSAGE(STATUS "Triosnnti_ENABLE_InfiniBand==${Triosnnti_ENABLE_InfiniBand}")
-#
-# MESSAGE(STATUS "CMAKE_HAVE_PTHREAD_H==${CMAKE_HAVE_PTHREAD_H}")
-# MESSAGE(STATUS "${PACKAGE_NAME}_HAVE_PTHREAD==${${PACKAGE_NAME}_HAVE_PTHREAD}")
-#
-# MESSAGE(STATUS "HAVE_TRIOS_INFINIBAND==${HAVE_TRIOS_INFINIBAND}")
-# MESSAGE(STATUS "HAVE_TRIOSNNTI_INFINIBAND==${HAVE_TRIOSNNTI_INFINIBAND}")
-
-# Various Trios checks
-INCLUDE(TriosProbeTimers)
-# Checks for a supported interconnect
-INCLUDE(TriosProbeNetwork)
-# Checks for a POSIX threads implementation
-INCLUDE(TriosProbeThreads)
-# Checks for a POSIX semaphore implementation
-INCLUDE(TriosProbeSemaphores)
-# Checks for the gettid() system call
-INCLUDE(TriosProbeGettid)
-# Check XDR implementation
-INCLUDE(TriosProbeXDR)
-
-IF (TPL_ENABLE_Netcdf)
- TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_NETCDF_SERVICE
- TRIOS_ENABLE_NETCDF_SERVICE
- "Build libraries for netcdf service."
- OFF )
-ENDIF (TPL_ENABLE_Netcdf)
-
-IF (TPL_ENABLE_Pnetcdf)
-TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_PNETCDF_SERVICE
- TRIOS_ENABLE_PNETCDF_SERVICE
- "Build libraries for PnetCDF service."
- OFF )
-ENDIF (TPL_ENABLE_Pnetcdf)
-
-TRIBITS_ADD_OPTION_AND_DEFINE( ${PACKAGE_NAME}_ENABLE_TRACING
- TRIOS_ENABLE_TRACING
- "Enable the tracing API"
- OFF
-)
-
-# Check for an RDMA transport (needed for Nessie)
-IF (${PACKAGE_NAME}_ENABLE_Portals OR
- ${PACKAGE_NAME}_ENABLE_CrayPortals OR
- ${PACKAGE_NAME}_ENABLE_InfiniBand OR
- ${PACKAGE_NAME}_ENABLE_Gemini OR
- ${PACKAGE_NAME}_ENABLE_BGPDCMF OR
- ${PACKAGE_NAME}_ENABLE_BGQPAMI OR
- ${PACKAGE_NAME}_ENABLE_MPI)
-
- SET(${PACKAGE_NAME}_HAVE_RDMA_TRANSPORT 1)
-ELSE()
- SET(${PACKAGE_NAME}_HAVE_RDMA_TRANSPORT 0)
-ENDIF()
-
-IF (${PROJECT_NAME}_ENABLE_Trioscommsplitter)
- SET(TRIOS_ENABLE_COMMSPLITTER TRUE)
-ENDIF()
-
-# Create the Trios_config.h file in ${CMAKE_BINARY_DIR}
-TRIBITS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h)
-
-# Copy the TriosProcessXDR.cmake file
-CONFIGURE_FILE(
- ${PACKAGE_SOURCE_DIR}/cmake/TriosProcessXDR.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/TriosProcessXDR.cmake
- COPYONLY
-)
-
-# Copy the UseTrios.cmake file
-CONFIGURE_FILE(
- ${PACKAGE_SOURCE_DIR}/cmake/UseTrios.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/UseTrios.cmake
- COPYONLY
-)
-
-
-###########################################################
-# C) Add the libraries, tests, and examples
-#
-
-# Need this include so codes can find the config file
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-TRIBITS_PROCESS_SUBPACKAGES()
-
-TRIBITS_PACKAGE_DEF()
-
-
-###########################################################
-# D) Do standard postprocessing
-#
-
-# Install cmake scripts so others can use them
-INSTALL(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/TriosProcessXDR.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/UseTrios.cmake
- DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/cmake/${PACKAGE_NAME}"
-)
-
-MESSAGE(STATUS "Trios_TPL_LIBRARIES = ${TPL_LIBRARIES}")
-
-
-TRIBITS_PACKAGE_POSTPROCESS()
-
-#get_cmake_property(_variableNames VARIABLES)
-#foreach (_variableName ${_variableNames})
-# message(STATUS "${_variableName}=${${_variableName}}")
-#endforeach()
-
diff --git a/packages/trios/Copyright.txt b/packages/trios/Copyright.txt
deleted file mode 100644
index 326016ba7224..000000000000
--- a/packages/trios/Copyright.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
diff --git a/packages/trios/ReleaseNotes.txt b/packages/trios/ReleaseNotes.txt
deleted file mode 100644
index a9723462b7f5..000000000000
--- a/packages/trios/ReleaseNotes.txt
+++ /dev/null
@@ -1,13 +0,0 @@
------------------------------------------
-Release Notes for Trilinos Package Trios
------------------------------------------
-
-Trilinos 10.12
-------------------------------
-
-* Significant changes to thread support for nessie.
- * Implemented thread-safe version of nessie client/server... not fully tested.
- * Removed thread pool and threaded support from server. Assume service developer has their own thread pool.
-* Valgrind-detected bug fixes for IB port of NNTI.
-* Modified xfer-service (example) to use multiple servers.
- * Implemented two different client/partitioning schemes: round robin, block partition.
diff --git a/packages/trios/cmake/Dependencies.cmake b/packages/trios/cmake/Dependencies.cmake
deleted file mode 100644
index 4be08aff4a8a..000000000000
--- a/packages/trios/cmake/Dependencies.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-SET(SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS
- commsplitter libraries/commsplitter EX OPTIONAL
- support libraries/support EX OPTIONAL
- nnti libraries/nessie/nnti EX OPTIONAL
- nssi libraries/nessie/nssi EX OPTIONAL
- programs programs EX OPTIONAL
- examples examples EX OPTIONAL
- tests tests EX OPTIONAL
- netcdf-service services/netcdf EX OPTIONAL
-)
-
-SET(LIB_REQUIRED_DEP_PACKAGES )
-SET(LIB_OPTIONAL_DEP_PACKAGES TeuchosCore)
-SET(TEST_REQUIRED_DEP_PACKAGES)
-SET(TEST_OPTIONAL_DEP_PACKAGES)
-SET(LIB_REQUIRED_DEP_TPLS)
-SET(LIB_OPTIONAL_DEP_TPLS BGQPAMI BGPDCMF MPI Netcdf Pnetcdf Pthread CrayPortals Portals Gemini InfiniBand Pablo PAPI HPCToolkit)
-SET(TEST_REQUIRED_DEP_TPLS)
-SET(TEST_OPTIONAL_DEP_TPLS)
diff --git a/packages/trios/cmake/TriosProbeGettid.cmake b/packages/trios/cmake/TriosProbeGettid.cmake
deleted file mode 100644
index 0576daa12118..000000000000
--- a/packages/trios/cmake/TriosProbeGettid.cmake
+++ /dev/null
@@ -1,33 +0,0 @@
-
-########## CHECK FOR HEADER FILES ############
-
-INCLUDE(CheckIncludeFiles)
-
-# Probe for syscall header files
-CHECK_INCLUDE_FILES("unistd.h" HAVE_TRIOS_UNISTD_H)
-CHECK_INCLUDE_FILES("syscall.h" HAVE_TRIOS_SYSCALL_H)
-
-########## CHECK FOR FUNCTIONS ############
-
-INCLUDE(CheckSymbolExists)
-INCLUDE(CheckFunctionExists)
-INCLUDE(CheckCSourceCompiles)
-
-# syscall()
-IF (HAVE_TRIOS_UNISTD_H)
- CHECK_FUNCTION_EXISTS(syscall HAVE_TRIOS_SYSCALL)
-ENDIF (HAVE_TRIOS_UNISTD_H)
-
-# SYS_gettid
-IF (HAVE_TRIOS_SYSCALL_H)
- CHECK_SYMBOL_EXISTS(SYS_gettid "syscall.h" HAVE_TRIOS_SYS_GETTID)
-ENDIF (HAVE_TRIOS_SYSCALL_H)
-
-IF (HAVE_TRIOS_SYSCALL)
- IF (HAVE_TRIOS_SYS_GETTID)
- check_c_source_compiles(
- "#include \n#include \nint main(){syscall(SYS_gettid);return 0;}"
- HAVE_TRIOS_GETTID
- )
- ENDIF (HAVE_TRIOS_SYS_GETTID)
-ENDIF (HAVE_TRIOS_SYSCALL)
diff --git a/packages/trios/cmake/TriosProbeNetwork.cmake b/packages/trios/cmake/TriosProbeNetwork.cmake
deleted file mode 100644
index decc7ee4f036..000000000000
--- a/packages/trios/cmake/TriosProbeNetwork.cmake
+++ /dev/null
@@ -1,101 +0,0 @@
-
-include(CheckLibraryExists)
-include(CheckFunctionExists)
-include(CheckCSourceCompiles)
-include(CheckCXXSourceCompiles)
-include(CheckTypeSize)
-
-
-########## INCLUDE FILES ##############
-include(CheckIncludeFiles)
-
-check_include_files("malloc.h" HAVE_TRIOS_MALLOC_H)
-check_include_files("sys/types.h" HAVE_TRIOS_SYS_TYPES_H)
-check_include_files("sys/param.h" HAVE_TRIOS_SYS_PARAM_H)
-check_include_files("sys/ioctl.h" HAVE_TRIOS_SYS_IOCTL_H)
-check_include_files("sys/socket.h" HAVE_TRIOS_SYS_SOCKET_H)
-check_include_files("sys/sockio.h" HAVE_TRIOS_SYS_SOCKIO_H)
-check_include_files("netdb.h" HAVE_TRIOS_NETDB_H)
-check_include_files("sys/socket;net/if.h" HAVE_TRIOS_NET_IF_H)
-check_include_files("sys/socket.h;net/if_dl.h" HAVE_TRIOS_NET_IF_DL_H)
-check_include_files("sys/socket.h;net/if_arp.h" HAVE_TRIOS_NET_IF_ARP_H)
-check_include_files("netinet/in.h" HAVE_TRIOS_NETINET_IN_H)
-check_include_files("arpa/inet.h" HAVE_TRIOS_ARPA_INET_H)
-check_include_files("sys/types.h;sys/socket.h;ifaddrs.h" HAVE_TRIOS_IFADDRS_H)
-
-########## Probe for various network configurations ##############
-
-
-check_function_exists(getifaddrs TRIOS_HAVE_GETIFADDRS)
-
-set(CMAKE_EXTRA_INCLUDE_FILES "netinet/in.h")
-check_type_size("struct sockaddr_in" HAVE_TRIOS_STRUCT_SOCKADDR_IN)
-set(CMAKE_EXTRA_INCLUDE_FILES)
-
-
-######## Portals Config ##################
-
-IF (${PACKAGE_NAME}_ENABLE_Portals OR ${PACKAGE_NAME}_ENABLE_CrayPortals)
-
- message(STATUS "Checking Portals configuration: PORTALS_IFACE_DEFAULT=${PORTALS_IFACE_DEFAULT}")
-
- # Need this macro defined to get the right integer types for Portals
- ADD_DEFINITIONS(-D__STDC_CONSTANT_MACROS)
-
- # Also need values for PTL_IFACE_SERVER and PTL_IFACE_CLIENT
- if (NOT PORTALS_IFACE_SERVER)
- set(PORTALS_IFACE_SERVER "PTL_IFACE_DEFAULT" CACHE STRING "Default NAL for the Portals server")
- endif (NOT PORTALS_IFACE_SERVER)
- if (NOT PORTALS_IFACE_CLIENT)
- set(PORTALS_IFACE_CLIENT "PTL_IFACE_DEFAULT" CACHE STRING "Default NAL for a Portals client")
- endif (NOT PORTALS_IFACE_CLIENT)
-
- ADD_DEFINITIONS(-DPTL_IFACE_CLIENT=${PORTALS_IFACE_CLIENT})
- ADD_DEFINITIONS(-DPTL_IFACE_SERVER=${PORTALS_IFACE_SERVER})
-
- # Figure out the name of the Portals include file
- IF (${PACKAGE_NAME}_ENABLE_Portals)
- SET (PORTALS_INCLUDE_FILE "portals3.h")
- ENDIF (${PACKAGE_NAME}_ENABLE_Portals)
-
- IF (${PACKAGE_NAME}_ENABLE_CrayPortals)
- SET (PORTALS_INCLUDE_FILE "portals/portals3.h")
- ENDIF (${PACKAGE_NAME}_ENABLE_CrayPortals)
-
- SET(CMAKE_REQUIRED_INCLUDES ${Portals_INCLUDE_DIRS})
- SET(CMAKE_EXTRA_INCLUDE_FILES ${PORTALS_INCLUDE_FILE})
- set(CMAKE_REQUIRED_LIBRARIES ${TPL_Portals_LIBRARIES})
-
- check_include_files(p3nal_utcp.h HAVE_TRIOS_P3NAL_UTCP_H)
- check_include_files("p3nal_utcp.h" HAVE_TRIOS_P3NAL_UTCP_H)
- check_include_files("p3rt/p3rt.h" HAVE_TRIOS_P3RT_P3RT_H)
-
- # Check for PTL_NOACK_REQ
- check_c_source_compiles(
- "#include<${PORTALS_INCLUDE_FILE}>\nmain(){return PTL_NOACK_REQ;}"
- HAVE_TRIOS_PTL_NOACK_REQ)
-
- # Check for PTL_NO_ACK_REQ
- check_c_source_compiles(
- "#include<${PORTALS_INCLUDE_FILE}>\nint main() {return PTL_NO_ACK_REQ;}"
- HAVE_TRIOS_PTL_NO_ACK_REQ)
-
- # Check for portals types
-
- check_type_size(ptl_time_t HAVE_TRIOS_PTL_TIME_T)
- check_type_size(ptl_eq_handler_t HAVE_TRIOS_PTL_EQ_HANDLER_T)
-
- # Check for portals functions
- check_function_exists(PtlErrorStr HAVE_TRIOS_PTLERRORSTR)
- check_function_exists(PtlNIFailStr HAVE_TRIOS_PTLNIFAILSTR)
- check_function_exists(PtlEventKindStr HAVE_TRIOS_PTLEVENTKINDSTR)
- check_function_exists(PtlGetJid HAVE_TRIOS_PTLGITJID)
- check_function_exists(PtlACEntry HAVE_TRIOS_PTLACENTRY)
-
- SET(CMAKE_REQUIRED_INCLUDES)
- SET(CMAKE_EXTRA_INCLUDE_FILES)
- set(CMAKE_REQUIRED_LIBRARIES)
-
-ENDIF (${PACKAGE_NAME}_ENABLE_Portals OR ${PACKAGE_NAME}_ENABLE_CrayPortals)
-
-
diff --git a/packages/trios/cmake/TriosProbeSemaphores.cmake b/packages/trios/cmake/TriosProbeSemaphores.cmake
deleted file mode 100644
index 2c473e9c0dfe..000000000000
--- a/packages/trios/cmake/TriosProbeSemaphores.cmake
+++ /dev/null
@@ -1,81 +0,0 @@
-########## CHECK FOR HEADER FILES ############
-
-INCLUDE(CheckIncludeFiles)
-
-# Probe for semaphore header file
-CHECK_INCLUDE_FILES("semaphore.h" HAVE_TRIOS_SEMAPHORE_H)
-
-########## CHECK FOR FUNCTIONS ############
-
-include(CheckCSourceCompiles)
-INCLUDE(CheckCSourceRuns)
-
-
-IF (HAVE_TRIOS_SEMAPHORE_H)
-
- check_c_source_compiles(
- "#include \nint main(){sem_t lock;return 0;}"
- HAVE_TRIOS_SEM_T
- )
-
- # Probe for unnamed semaphore implementation
- SET(SOURCE
- "
- #include
- #include
- int main()
- {
- sem_t lock;
- if (sem_init(&lock, 0, 1) == -1) {
- return(1);
- }
- if (sem_wait(&lock) == -1) {
- return(2);
- }
- if (sem_post(&lock) == -1) {
- return(3);
- }
- if (sem_destroy(&lock) == -1) {
- return(4);
- }
-
- return 0;
- }
- "
- )
-
- CHECK_C_SOURCE_RUNS("${SOURCE}" HAVE_TRIOS_UNNAMED_SEMAPHORES)
-
- # Probe for named semaphore implementation
- SET(SOURCE
- "
- #include
- #include
- int main()
- {
- sem_t *lock;
- lock=sem_open(\"/trios.sem_test\", O_CREAT, 0600, 1);
- if (lock == SEM_FAILED) {
- return(1);
- }
- if (sem_wait(lock) == -1) {
- return(2);
- }
- if (sem_post(lock) == -1) {
- return(3);
- }
- if (sem_close(lock) == -1) {
- return(4);
- }
- if (sem_unlink(\"/trios.sem_test\") == -1) {
- return(5);
- }
-
- return 0;
- }
- "
- )
-
- CHECK_C_SOURCE_RUNS("${SOURCE}" HAVE_TRIOS_NAMED_SEMAPHORES)
-
-ENDIF(HAVE_TRIOS_SEMAPHORE_H)
diff --git a/packages/trios/cmake/TriosProbeThreads.cmake b/packages/trios/cmake/TriosProbeThreads.cmake
deleted file mode 100644
index 51a95216f505..000000000000
--- a/packages/trios/cmake/TriosProbeThreads.cmake
+++ /dev/null
@@ -1,83 +0,0 @@
-include(CheckLibraryExists)
-include(CheckFunctionExists)
-include(CheckCSourceCompiles)
-include(CheckCXXSourceCompiles)
-
-########## Probe for various thread configurations ##############
-
-IF (CMAKE_HAVE_PTHREAD_H)
-
- # Probe for pthreads header file
- CHECK_INCLUDE_FILES("pthread.h" HAVE_TRIOS_PTHREAD_H)
-
-
- # Test for a way to yield besides usleep(0)
- check_c_source_compiles(
- "#include \nint main(){pthread_yield();return 0;}"
- HAVE_TRIOS_PTHREAD_YIELD
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_yield_np();return 0;}"
- HAVE_TRIOS_PTHREAD_YIELD_NP
- )
- check_c_source_compiles(
- "#include \nint main(){sched_yield();return 0;}"
- HAVE_TRIOS_SCHED_YIELD
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_mutex_t mutex;return 0;}"
- HAVE_TRIOS_PTHREAD_MUTEX_T
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_mutex_t mutex;pthread_mutex_init(&mutex,NULL);return 0;}"
- HAVE_TRIOS_PTHREAD_MUTEX_INIT
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_mutex_t mutex;pthread_mutex_lock(&mutex);return 0;}"
- HAVE_TRIOS_PTHREAD_MUTEX_LOCK
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_mutex_t mutex;pthread_mutex_unlock(&mutex);return 0;}"
- HAVE_TRIOS_PTHREAD_MUTEX_UNLOCK
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_mutex_t mutex;pthread_mutex_destroy(&mutex);return 0;}"
- HAVE_TRIOS_PTHREAD_MUTEX_DESTROY
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_cond_t cond;return 0;}"
- HAVE_TRIOS_PTHREAD_COND_T
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_cond_t cond;pthread_cond_init(&cond,NULL);return 0;}"
- HAVE_TRIOS_PTHREAD_COND_INIT
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_mutex_t mutex;pthread_cond_t cond;pthread_cond_wait(&cond,&mutex);return 0;}"
- HAVE_TRIOS_PTHREAD_COND_WAIT
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_mutex_t mutex;pthread_cond_t cond;struct timespec *abstime;pthread_cond_timedwait(&cond,&mutex,abstime);return 0;}"
- HAVE_TRIOS_PTHREAD_COND_TIMEDWAIT
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_cond_t cond;pthread_cond_signal(&cond);return 0;}"
- HAVE_TRIOS_PTHREAD_COND_SIGNAL
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_cond_t cond;pthread_cond_broadcast(&cond);return 0;}"
- HAVE_TRIOS_PTHREAD_COND_BROADCAST
- )
- check_c_source_compiles(
- "#include \nint main(){pthread_cond_t cond;pthread_cond_destroy(&cond);return 0;}"
- HAVE_TRIOS_PTHREAD_COND_DESTROY
- )
- add_definitions(-D_GNU_SOURCE) # needed to find RECURSIVE mutex initializer
- # Test for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
- set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
- check_c_source_compiles(
- "#include \nint main(){pthread_mutex_t mutex=PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;return 0;}"
- HAVE_TRIOS_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
- )
-
-ENDIF()
diff --git a/packages/trios/cmake/TriosProbeTimers.cmake b/packages/trios/cmake/TriosProbeTimers.cmake
deleted file mode 100644
index af715e5ee664..000000000000
--- a/packages/trios/cmake/TriosProbeTimers.cmake
+++ /dev/null
@@ -1,44 +0,0 @@
-
-########## CHECK FOR HEADER FILES ############
-
-INCLUDE(CheckIncludeFiles)
-
-# Probe for timer header files
-CHECK_INCLUDE_FILES("mach/mach_time.h" HAVE_TRIOS_MACH_TIME_H)
-CHECK_INCLUDE_FILES("time.h" HAVE_TRIOS_TIME_H)
-CHECK_INCLUDE_FILES("sys/time.h" HAVE_TRIOS_SYS_TIME_H)
-
-if (TPL_ENABLE_PAPI)
- CHECK_INCLUDE_FILES("papi.h" HAVE_TRIOS_PAPI_H)
-endif (TPL_ENABLE_PAPI)
-
-########## CHECK FOR FUNCTIONS ############
-
-INCLUDE(CheckLibraryExists)
-INCLUDE(CheckFunctionExists)
-INCLUDE(CheckCSourceCompiles)
-INCLUDE(CheckCXXSourceCompiles)
-
-# clock_gettime
-IF (HAVE_TRIOS_TIME_H)
- CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_TRIOS_CLOCK_GETTIME)
- IF (HAVE_TRIOS_CLOCK_GETTIME)
- SET(CMAKE_REQUIRED_LIBRARIES "rt;${CMAKE_REQUIRED_LIBRARIES}")
- ENDIF (HAVE_TRIOS_CLOCK_GETTIME)
-ENDIF(HAVE_TRIOS_TIME_H)
-
-# gettimeofday
-IF (HAVE_TRIOS_SYS_TIME_H)
- CHECK_FUNCTION_EXISTS(gettimeofday HAVE_TRIOS_GETTIMEOFDAY)
-ENDIF (HAVE_TRIOS_SYS_TIME_H)
-
-# papi
-IF (HAVE_TRIOS_PAPI_H)
- CHECK_FUNCTION_EXISTS(PAPI_get_real_usec HAVE_TRIOS_PAPI_GET_REAL_USEC)
- SET(HAVE_TRIOS_PAPI ${HAVE_TRIOS_PAPI_GET_REAL_USEC})
-ENDIF (HAVE_TRIOS_PAPI_H)
-
-# mach_absolute_time (on apple)
-IF (HAVE_TRIOS_MACH_TIME_H)
- CHECK_FUNCTION_EXISTS(mach_absolute_time HAVE_TRIOS_MACH_ABSOLUTE_TIME)
-ENDIF (HAVE_TRIOS_MACH_TIME_H)
diff --git a/packages/trios/cmake/TriosProbeXDR.cmake b/packages/trios/cmake/TriosProbeXDR.cmake
deleted file mode 100644
index 19d799a6f95f..000000000000
--- a/packages/trios/cmake/TriosProbeXDR.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-
-########## CHECK FOR HEADER FILES ############
-
-INCLUDE(CheckIncludeFiles)
-
-########## CHECK FOR FUNCTIONS ############
-
-INCLUDE(CheckLibraryExists)
-INCLUDE(CheckFunctionExists)
-INCLUDE(CheckCSourceCompiles)
-INCLUDE(CheckCXXSourceCompiles)
-
-CHECK_FUNCTION_EXISTS(xdr_u_int16_t HAVE_TRIOS_XDR_U_INT16_T)
-CHECK_FUNCTION_EXISTS(xdr_u_int32_t HAVE_TRIOS_XDR_U_INT32_T)
-CHECK_FUNCTION_EXISTS(xdr_u_int64_t HAVE_TRIOS_XDR_U_INT64_T)
-
-# XDR_SIZEOF
-check_c_source_compiles(
- "#include \nint main(){xdr_sizeof(NULL,NULL);return 0;}"
- HAVE_TRIOS_XDR_SIZEOF
-)
diff --git a/packages/trios/cmake/TriosProcessXDR.cmake b/packages/trios/cmake/TriosProcessXDR.cmake
deleted file mode 100644
index c1f39b44059d..000000000000
--- a/packages/trios/cmake/TriosProcessXDR.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-############# Function to generate XDR source and header Files ###############
-
-function (TriosProcessXDR path)
-
- GET_FILENAME_COMPONENT(file ${path} NAME_WE)
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file}.c
- COMMAND rpcgen -Cc ${path}
- | sed -e "\"s#include.*${file}.*#include <${file}.h>#\""
- > ${CMAKE_CURRENT_BINARY_DIR}/${file}.c
- DEPENDS ${path} ${file}.h)
-
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file}.h
- COMMAND rpcgen -Ch ${path}
- | sed -e "\"s#rpc/rpc.h#${file}.h#\""
- | perl -pe \"BEGIN{undef $$/\;} s/\(enum\\s\\w+\\s\\{\\n\(\\s*.*?,\\n\)*?\\s*.*?\),\(\\n\\s*\\}\;\)/\\1\\3/smg\"
- > ${CMAKE_CURRENT_BINARY_DIR}/${file}.h
- DEPENDS ${path})
-
- # Need target to force construction of nssi_types_xdr.{c,h} and nnti_xdr.{c,h}
- add_custom_target(${file} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${file}.c ${CMAKE_CURRENT_BINARY_DIR}/${file}.h)
-
-endfunction (TriosProcessXDR)
diff --git a/packages/trios/cmake/Trios_config.h.in b/packages/trios/cmake/Trios_config.h.in
deleted file mode 100644
index cab1bfac849f..000000000000
--- a/packages/trios/cmake/Trios_config.h.in
+++ /dev/null
@@ -1,134 +0,0 @@
-
-/* Deprecation notice */
-#if !defined(TRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS)
-#ifdef __GNUC__
-# warning "The package Trios is deprecated in April 2019; it will be removed from Trilinos in May 2019."
-#endif
-#endif
-
-/* ************************************************
- * Network configuration
- * ************************************************ */
-
-/* Network Transports */
-#cmakedefine HAVE_TRIOS_CRAYPORTALS 1
-#cmakedefine HAVE_TRIOS_PORTALS 1
-#cmakedefine HAVE_TRIOS_INFINIBAND 1
-#cmakedefine HAVE_TRIOS_GEMINI 1
-#cmakedefine HAVE_TRIOS_BGPDCMF 1
-#cmakedefine HAVE_TRIOS_BGQPAMI 1
-#cmakedefine HAVE_TRIOS_MPI 1
-
-/* Special Portals config */
-#cmakedefine HAVE_TRIOS_PTLERRORSTR 1
-#cmakedefine HAVE_TRIOS_PTLNIFAILSTR 1
-#cmakedefine HAVE_TRIOS_PTLEVENTKINDSTR 1
-#cmakedefine HAVE_TRIOS_PTLGITJID 1
-#cmakedefine HAVE_TRIOS_PTLACENTRY 1
-#cmakedefine HAVE_TRIOS_PTL_NOACK_REQ 1
-#cmakedefine HAVE_TRIOS_PTL_NO_ACK_REQ 1
-#cmakedefine HAVE_TRIOS_P3RT_P3RT_H 1
-#cmakedefine HAVE_TRIOS_P3NAL_UTCP_H 1
-#cmakedefine HAVE_TRIOS_PTL_TIME_T
-#cmakedefine HAVE_TRIOS_PTL_EQ_HANDLER_T
-
-/* Headers */
-#cmakedefine HAVE_TRIOS_MALLOC_H 1
-#cmakedefine HAVE_TRIOS_SYS_TYPES_H 1
-#cmakedefine HAVE_TRIOS_SYS_PARAM_H 1
-#cmakedefine HAVE_TRIOS_SYS_IOCTL_H 1
-#cmakedefine HAVE_TRIOS_SYS_SOCKET_H 1
-#cmakedefine HAVE_TRIOS_SYS_SOCKIO_H 1
-#cmakedefine HAVE_TRIOS_NETDB_H 1
-#cmakedefine HAVE_TRIOS_NET_IF_H 1
-#cmakedefine HAVE_TRIOS_NET_IF_DL_H 1
-#cmakedefine HAVE_TRIOS_NET_IF_ARP_H 1
-#cmakedefine HAVE_TRIOS_NETINET_IN_H 1
-#cmakedefine HAVE_TRIOS_ARPA_INET_H 1
-#cmakedefine HAVE_TRIOS_IFADDRS_H 1
-#cmakedefine HAVE_TRIOS_STRUCT_SOCKADDR_IN 1
-
-/* ************************************************
- * I/O Libraries
- * ************************************************ */
-#cmakedefine HAVE_TRIOS_NETCDF 1
-#cmakedefine HAVE_TRIOS_PNETCDF 1
-
-/* ************************************************
- * Misc Config
- * ************************************************ */
-#cmakedefine TRIOS_HAVE_GETIFADDRS 1
-
-/* ************************************************
- * CommSplitter Config
- * ************************************************ */
-#cmakedefine TRIOS_ENABLE_COMMSPLITTER 1
-
-
-/* ************************************************
- * Semaphore configuration
- * ************************************************ */
-#cmakedefine HAVE_TRIOS_SEMAPHORE_H 1
-#cmakedefine HAVE_TRIOS_SEM_T 1
-#cmakedefine HAVE_TRIOS_UNNAMED_SEMAPHORES 1
-#cmakedefine HAVE_TRIOS_NAMED_SEMAPHORES 1
-
-
-/* ************************************************
- * Linux thread ID configuration
- * ************************************************ */
-#cmakedefine HAVE_TRIOS_UNISTD_H 1
-#cmakedefine HAVE_TRIOS_SYSCALL_H 1
-#cmakedefine HAVE_TRIOS_GETTID 1
-
-
-/* ************************************************
- * Pthread configuration
- * ************************************************ */
-#cmakedefine HAVE_TRIOS_PTHREAD_H 1
-#cmakedefine HAVE_TRIOS_PTHREAD_MUTEX_T 1
-#cmakedefine HAVE_TRIOS_PTHREAD_MUTEX_INIT 1
-#cmakedefine HAVE_TRIOS_PTHREAD_MUTEX_LOCK 1
-#cmakedefine HAVE_TRIOS_PTHREAD_MUTEX_UNLOCK 1
-#cmakedefine HAVE_TRIOS_PTHREAD_MUTEX_DESTROY 1
-#cmakedefine HAVE_TRIOS_PTHREAD_COND_T 1
-#cmakedefine HAVE_TRIOS_PTHREAD_COND_INIT 1
-#cmakedefine HAVE_TRIOS_PTHREAD_COND_WAIT 1
-#cmakedefine HAVE_TRIOS_PTHREAD_COND_TIMEDWAIT 1
-#cmakedefine HAVE_TRIOS_PTHREAD_COND_SIGNAL 1
-#cmakedefine HAVE_TRIOS_PTHREAD_COND_BROADCAST 1
-#cmakedefine HAVE_TRIOS_PTHREAD_COND_DESTROY 1
-
-
-/* ************************************************
- * Timer configuration
- * ************************************************ */
-#cmakedefine HAVE_TRIOS_SYS_TIME_H 1
-#cmakedefine HAVE_TRIOS_CLOCK_GETTIME 1
-#cmakedefine HAVE_TRIOS_TIME_H 1
-#cmakedefine HAVE_TRIOS_GETTIMEOFDAY 1
-#cmakedefine HAVE_TRIOS_PAPI_H 1
-#cmakedefine HAVE_TRIOS_PAPI 1
-#cmakedefine HAVE_TRIOS_MACH_TIME_H 1
-#cmakedefine HAVE_TRIOS_MACH_ABSOLUTE_TIME 1
-
-/* ************************************************
- * Tracing configuration
- * ************************************************ */
-#cmakedefine TRIOS_ENABLE_TRACING 1
-#cmakedefine TRIOS_ENABLE_PAPI @Trios_ENABLE_PAPI@
-#cmakedefine HAVE_TRIOS_PABLO 1
-
-/* ************************************************
- * HPCToolkit configuration
- * ************************************************ */
-#cmakedefine HAVE_TRIOS_HPCTOOLKIT 1
-
-/* ************************************************
- * XDR configuration
- * ************************************************ */
-#cmakedefine HAVE_TRIOS_XDR_U_INT16_T
-#cmakedefine HAVE_TRIOS_XDR_U_INT32_T
-#cmakedefine HAVE_TRIOS_XDR_U_INT64_T
-#cmakedefine HAVE_TRIOS_XDR_SIZEOF 1
-
diff --git a/packages/trios/cmake/UseTrios.cmake b/packages/trios/cmake/UseTrios.cmake
deleted file mode 100644
index b13db62c4508..000000000000
--- a/packages/trios/cmake/UseTrios.cmake
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-#
-# See the file TriosConfig.cmake for all variables set when
-# executing the FindPackage(Trios) command.
-#
-# Compilers
-# Trios_CXX_COMPILER
-# Trios_C_COMPILER
-# Trios_FORTRAN_COMPILER
-#
-# Compiler Flags
-# Trios_CXX_FLAGS
-# Trios_C_FLAGS
-# Trios_FORTRAN_FLAGS
-# Trios_EXTRA_LD_FLAGS
-#
-# Paths
-# Trios_INCLUDE_DIRS
-# Trios_LIBRARY_DIRS
-# Trios_LIBRARIES
-# Trios_TPL_INCLUDE_DIRS
-# Trios_TPL_LIBRARY_DIRS
-# Trios_TPL_LIBRARIES
-#
-IF(NOT Trios_USE_FILE_INCLUDED)
- SET(Trios_USE_FILE_INCLUDED 1)
-
- if (Trios_FOUND)
-
- # Add compiler flags
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Trios_C_FLAGS}")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Trios_CXX_FLAGS}")
- SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} ${Trios_FORTRAN_FLAGS}")
-
- # Add include directories
- INCLUDE_DIRECTORIES(${Trios_INCLUDE_DIRS})
- INCLUDE_DIRECTORIES(${Trios_TPL_INCLUDE_DIRS})
-
- # Add link directories
- LINK_DIRECTORIES(${Trios_LIBRARY_DIRS})
- LINK_DIRECTORIES(${Trios_TPL_LIBRARY_DIRS})
-
-
- # Add libraries directories
- SET(CMAKE_EXTRA_LIBS "${CMAKE_EXTRA_LIBS}")
-
- # Add path to CMAKE files
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Trios_DIR}")
-
- ENDIF (Trios_FOUND)
-
-ENDIF(NOT Trios_USE_FILE_INCLUDED)
diff --git a/packages/trios/docs/.gitignore b/packages/trios/docs/.gitignore
deleted file mode 100644
index 2ec816f3ef2c..000000000000
--- a/packages/trios/docs/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-html
-latex
diff --git a/packages/trios/docs/Doxyfile b/packages/trios/docs/Doxyfile
deleted file mode 100644
index 22db094dd2dc..000000000000
--- a/packages/trios/docs/Doxyfile
+++ /dev/null
@@ -1,1750 +0,0 @@
-# Doxyfile 1.7.5.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME = "Network Scalable Service Interface (Nessie)"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = NO
-
-# 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 =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# 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 regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# 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
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = NO
-
-# 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 = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = NO
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = NO
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = NO
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= NO
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page. This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command , where is the value of
-# the FILE_VERSION_FILTER tag, and is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE = DoxygenLayout.xml
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# 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
-# with spaces.
-
-INPUT = ../
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS = *.h \
- *.doxy \
- *.x
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# 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.
-# Note that relative paths are relative to directory from which doxygen is run.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH = images
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command , where
-# is the value of the INPUT_FILTER tag, and is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML 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 `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is adviced to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-#
-# Qt Help Project / Custom Filters.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-#
-# Qt Help Project / Filter Attributes.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the
-# mathjax.org site, so you can quickly see the result without installing
-# MathJax, but it is strongly recommended to install a local copy of MathJax
-# before deployment.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-MATHJAX_EXTENSIONS =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# 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
-# 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
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-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
-# 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
-# save some trees in general.
-
-COMPACT_LATEX = YES
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = letter
-
-# 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 =
-
-# 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 =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER =
-
-# 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 = YES
-
-# 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.
-# 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.)
-# in the output.
-
-LATEX_HIDE_INDICES = YES
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = YES
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-LATEX_BIB_STYLE = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF 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 `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# 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
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# 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
-# files.
-
-ENABLE_PREPROCESSING = NO
-
-# 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
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when 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 preprocessor.
-
-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
-# be used.
-
-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
-# instead of the = operator.
-
-PREDEFINED =
-
-# 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 that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = NO
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-INTERACTIVE_SVG = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
diff --git a/packages/trios/examples/CMakeLists.txt b/packages/trios/examples/CMakeLists.txt
deleted file mode 100644
index 9338fe371d82..000000000000
--- a/packages/trios/examples/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-TRIBITS_SUBPACKAGE(examples)
-
-TRIBITS_ADD_EXAMPLE_DIRECTORIES(xfer-service)
-
-TRIBITS_SUBPACKAGE_POSTPROCESS()
diff --git a/packages/trios/examples/cmake/Dependencies.cmake b/packages/trios/examples/cmake/Dependencies.cmake
deleted file mode 100644
index 32714b27996c..000000000000
--- a/packages/trios/examples/cmake/Dependencies.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-SET(LIB_REQUIRED_DEP_PACKAGES Triosnssi TeuchosCore)
-SET(LIB_OPTIONAL_DEP_PACKAGES)
-SET(TEST_REQUIRED_DEP_PACKAGES)
-SET(TEST_OPTIONAL_DEP_PACKAGES)
-SET(LIB_REQUIRED_DEP_TPLS MPI)
-SET(LIB_OPTIONAL_DEP_TPLS)
-SET(TEST_REQUIRED_DEP_TPLS)
-SET(TEST_OPTIONAL_DEP_TPLS)
diff --git a/packages/trios/examples/xfer-service/CMakeLists.txt b/packages/trios/examples/xfer-service/CMakeLists.txt
deleted file mode 100644
index 5da387f34658..000000000000
--- a/packages/trios/examples/xfer-service/CMakeLists.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-
-# @HEADER
-# ************************************************************************
-#
-# Trios: Trilinos I/O Support
-# Copyright 2011 Sandia Corporation
-#
-# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-# the U.S. Government retains certain rights in this software.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. 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.
-#
-# 3. Neither the name of the Corporation nor the names of the
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-# 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.
-#
-# Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-#
-# *************************************************************************
-# @HEADER
-
-
-INCLUDE(TriosProcessXDR)
-
-
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-# Generate the XDR header and source file for the service arguments
-TriosProcessXDR(${CMAKE_CURRENT_SOURCE_DIR}/xfer_service_args.x)
-
-
-TRIBITS_ADD_EXECUTABLE(
- XferMPITest
- SOURCES xfer_service_args.c xfer_util.cpp xfer_mpi_server.cpp xfer_mpi_test.cpp xfer_mpi_client.cpp
- DEPLIBS ${DEPLIBS}
- NOEXEPREFIX
-)
-
-
-TRIBITS_ADD_EXECUTABLE(
- XferServiceTest
- SOURCES xfer_service_args.c xfer_util.cpp xfer_server.cpp xfer_threads.cpp xfer_service_test.cpp xfer_client.cpp
- DEPLIBS ${DEPLIBS}
- NOEXEPREFIX
-)
-
-SET(EXTRA_TEST_ARGS "")
-
-# Gemini network transport takes a few seconds to initialize
-IF (${PACKAGE_NAME}_ENABLE_Gemini)
- APPEND_SET(EXTRA_TEST_ARGS "--delay=3")
-ENDIF()
-
-
-SET(TESTNAMES
- write-encode-sync
- write-encode-async
- write-rdma-sync
- write-rdma-async
- read-encode-sync
- read-encode-async
- read-rdma-sync
- read-rdma-async)
-
-
-foreach (testname ${TESTNAMES})
-
- SET(DEFAULT_ARGS "--io-method=${testname} --validate ")
- SET(DEFAULT_ARGS "${DEFAULT_ARGS} --result-file=${testname}-result.out ")
- SET(DEFAULT_ARGS "${DEFAULT_ARGS} --result-file-mode=a ")
- SET(DEFAULT_ARGS "${DEFAULT_ARGS} --num-trials=5 ")
-
- TRIBITS_ADD_TEST(
- XferServiceTest
- NOEXEPREFIX
- NAME XferService_${testname}
- ARGS "${DEFAULT_ARGS} ${EXTRA_TEST_ARGS}"
- COMM serial mpi
- NUM_MPI_PROCS 2)
-
- #SET_TESTS_PROPERTIES(${PACKAGE_NAME}_XferService_${testname}_MPI_2 PROPERTIES TIMEOUT 10)
-endforeach()
-
-
diff --git a/packages/trios/examples/xfer-service/cmake/Dependencies.cmake b/packages/trios/examples/xfer-service/cmake/Dependencies.cmake
deleted file mode 100644
index 32714b27996c..000000000000
--- a/packages/trios/examples/xfer-service/cmake/Dependencies.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-SET(LIB_REQUIRED_DEP_PACKAGES Triosnssi TeuchosCore)
-SET(LIB_OPTIONAL_DEP_PACKAGES)
-SET(TEST_REQUIRED_DEP_PACKAGES)
-SET(TEST_OPTIONAL_DEP_PACKAGES)
-SET(LIB_REQUIRED_DEP_TPLS MPI)
-SET(LIB_OPTIONAL_DEP_TPLS)
-SET(TEST_REQUIRED_DEP_TPLS)
-SET(TEST_OPTIONAL_DEP_TPLS)
diff --git a/packages/trios/examples/xfer-service/xfer_client.cpp b/packages/trios/examples/xfer-service/xfer_client.cpp
deleted file mode 100644
index 9e11d8476755..000000000000
--- a/packages/trios/examples/xfer-service/xfer_client.cpp
+++ /dev/null
@@ -1,932 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/**
- * @file xfer-client.cpp
- *
- */
-
-/**
- * @defgroup xfer_client Data Transfer Client
- *
- * @ingroup xfer_example
- *
- * @{
- */
-
-#include "Trios_config.h"
-#include "Trios_nssi_client.h"
-#include "Trios_logger.h"
-#include "Trios_timer.h"
-
-#include "xfer_client.h"
-
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "Teuchos_CommandLineProcessor.hpp"
-
-#include "xfer_service_args.h"
-#include "xfer_util.h"
-
-
-
-log_level client_debug_level = LOG_UNDEFINED;
-
-/* prototype for a function to initialize buffers */
-extern int print_args(
- std::ostream &out,
- const struct xfer_args &args,
- const char *prefix);
-
-
-
-/**
- * @brief Asynchronous transfer of \ref data_t array with the request structure.
- *
- * This function marshals the \ref data_array_t array of 16-byte
- * structures with the request and send it to the server using the
- * nssi_call_rpc() function.
- *
- * @param svc The service description of the remote service.
- * @param array The data array to transfer.
- * @param req The \ref nssi_request returned to caller.
- */
-int xfer_write_encode(
- const nssi_service *svc,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- const data_array_t *array,
- nssi_request *req)
-{
- int rc = NSSI_OK;
- xfer_write_encode_args args;
-
- /* initialize the arguments */
- memset(&args, 0, sizeof(xfer_write_encode_args));
- args.len = len;
- args.seed = seed;
- args.validate = validate;
-
- args.array.data_array_t_len = array->data_array_t_len;
- args.array.data_array_t_val = array->data_array_t_val;
-
- /* call the remote methods */
- rc = nssi_call_rpc(svc, XFER_WRITE_ENCODE_OP, &args, NULL, 0, NULL, req);
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "unable to call xfer_write_encode: %s",
- nssi_err_str(rc));
- }
-
- return rc;
-}
-
-/**
- * @brief Synchronous transfer of data with the request structure.
- *
- * This method attaches the entire request buffer to a request
- * and sends it to the server. This forces the client to encode
- * the buffer before sending, and it makes the size of the request
- * large, depending on the size of the data array.
- *
- * @param svc The service description of the remote service.
- * @param array The data array to transfer.
- */
-int xfer_write_encode_blk(
- const nssi_service *svc,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- const data_array_t *array)
-{
- int rc = NSSI_OK;
- int rc2 = NSSI_OK;
- nssi_request req;
-
- /* call the async function */
- rc = xfer_write_encode(svc, len, seed, validate, array, &req);
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "unable to call async method: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- /* wait for completion */
- rc2 = nssi_wait(&req, &rc);
- if (rc2 != NSSI_OK) {
- log_error(client_debug_level, "failed waiting for request: %s",
- nssi_err_str(rc));
- return rc2;
- }
-
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "remote method failed: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- return rc;
-
-}
-
-/**
- * @brief Asynchronous transfer of data via RDMA.
- *
- * This method sends the length of the data array to the server. After
- * receiving the request, the server pulls the data from the memory
- * buffer using the nssi_get_data() function. This function is asynchronous --
- * after sending the request to the server, this function returns the
- * request data structure. The caller must at some point call the
- * nssi_wait() or nssi_test() function to find out if the request is
- * complete.
- *
- * @param svc The service description of the remote service.
- * @param array The data array to transfer.
- * @param req The service request data structure.
- */
-int xfer_write_rdma(
- const nssi_service *svc,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- const data_array_t *array,
- nssi_request *req)
-{
- int rc = NSSI_OK;
- xfer_write_rdma_args args;
- int nbytes;
-
- /* the buffer to send to the server */
- const data_t *buf = array->data_array_t_val;
-
- /* initialize the arguments */
- memset(&args, 0, sizeof(xfer_write_rdma_args));
-
- /* the only argument to send is the size of the array */
- args.len = len;
- args.seed = seed;
- args.validate = validate;
-
- /* calculate the number of bytes in the buffer */
- nbytes = args.len*sizeof(data_t);
-
- /* call the remote methods (send buffer using the data portal) */
- rc = nssi_call_rpc(svc, XFER_WRITE_RDMA_OP, &args, (char *)buf, nbytes, NULL, req);
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "unable to call xfer_write_encode: %s",
- nssi_err_str(rc));
- }
-
- return rc;
-}
-
-/**
- * @brief Synchronous transfer of data via RDMA.
- *
- * This method sends the length of the data array to the server. After
- * receiving the request, the server pulls the data from the memory
- * buffer using the nssi_get_data() function. This function is blocking --
- * it calls the nssi_wait() function to make sure the server completed
- * the request before returning.
- *
- * @param svc The service description of the remote service.
- * @param array The data array to transfer.
- */
-int xfer_write_rdma_blk(
- const nssi_service *svc,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- const data_array_t *array)
-{
- int rc = NSSI_OK;
- int rc2 = NSSI_OK;
- nssi_request req;
-
- /* call the async function */
- rc = xfer_write_rdma(svc, len, seed, validate, array, &req);
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "unable to call async method: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- /* wait for completion */
- rc2 = nssi_wait(&req, &rc);
- if (rc2 != NSSI_OK) {
- log_error(client_debug_level, "failed waiting for request: %s",
- nssi_err_str(rc));
- return rc2;
- }
-
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "remote method failed: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- return rc;
-
-}
-
-
-
-/**
- * @brief Asynchronous transfer of \ref data_t array via RDMA. The server sends the data back in the result.
- *
- * This method sends the length of the data array to the server. After
- * receiving the request, the server pulls the data from the memory
- * buffer using the nssi_get_data() function. This function is asynchronous --
- * after sending the request to the server, this function returns the
- * request data structure. The caller must at some point call the
- * nssi_wait() or nssi_test() function to find out if the request is
- * complete.
- *
- * @param svc The service description of the remote service.
- * @param array The data array to transfer.
- * @param req The \ref nssi_request returned to caller.
- */
-int xfer_read_encode(
- const nssi_service *svc,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- xfer_read_encode_res *res,
- nssi_request *req)
-{
- int rc = NSSI_OK;
- xfer_read_encode_args args;
-
- /* initialize the arguments */
- memset(&args, 0, sizeof(xfer_read_encode_args));
- memset(res, 0, sizeof(xfer_read_encode_res));
-
- /* initialize the arguments */
- args.len = len;
- args.seed = seed;
- args.validate = validate;
-
- /* call the remote methods, array comes back in res */
- rc = nssi_call_rpc(svc, XFER_READ_ENCODE_OP, &args, NULL, 0, res, req);
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "unable to call xfer_4: %s",
- nssi_err_str(rc));
- }
-
- return rc;
-}
-
-/**
- * @brief Synchronous transfer of \ref data_t array via RDMA. The server sends the data back in the result.
- *
- * This method sends the length of the data array to the server. After
- * receiving the request, the server pulls the data from the memory
- * buffer using the nssi_get_data() function. This function is ssynchronous --
- * after sending the request to the server, this function calls nssi_wait()
- * to find out the result of the request.
- *
- * @param svc The service description of the remote service.
- * @param array The data array to transfer.
- */
-int xfer_read_encode_blk(
- const nssi_service *svc,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- xfer_read_encode_res *res)
-{
- int rc = NSSI_OK;
- int rc2 = NSSI_OK;
- nssi_request req;
-
- /* call the async function */
- rc = xfer_read_encode(svc, len, seed, validate, res, &req);
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "unable to call async method: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- /* wait for completion */
- rc2 = nssi_wait(&req, &rc);
- if (rc2 != NSSI_OK) {
- log_error(client_debug_level, "failed waiting for request: %s",
- nssi_err_str(rc));
- return rc2;
- }
-
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "remote method failed: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- return rc;
-
-}
-
-/**
- * @brief Asynchronous transfer of \ref data_t array with the request structure. The server sends the data back via RDMA.
- *
- * This function marshals the \ref data_array_t array of 16-byte
- * structures with the request and send it to the server using the
- * nssi_call_rpc() function. The server is expected to send the data
- * back using nssi_put_data().
- *
- * @param svc The service description of the remote service.
- * @param array The data array to transfer.
- * @param req The \ref nssi_request returned to caller.
- */
-int xfer_read_rdma(
- const nssi_service *svc,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- data_array_t *put_buf,
- nssi_request *req)
-{
- int rc = NSSI_OK;
- xfer_read_rdma_args args;
- log_level debug_level = client_debug_level;
-
- int nbytes;
-
- /* initialize the arguments */
- memset(&args, 0, sizeof(xfer_read_rdma_args));
-
- assert(len == put_buf->data_array_t_len);
-
-
- /* tell the server how about the buffer */
- args.len = len;
- args.seed = seed;
- args.validate = validate;
-
- /* calculate the number of bytes in the buffer */
- nbytes = args.len*sizeof(data_t);
-
- data_t *buf;
- //buf = (data_t *)malloc(nbytes);
- buf = put_buf->data_array_t_val;
-
- log_debug(debug_level, "Calling RPC for XFER_READ_RDMA_OP, len=%d, val=%p, nbytes=%d",
- put_buf->data_array_t_len, buf, nbytes);
-
- /* call the remote methods */
- rc = nssi_call_rpc(svc, XFER_READ_RDMA_OP, &args, buf, nbytes, NULL, req);
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "unable to call xfer_5: %s",
- nssi_err_str(rc));
- }
-
- return rc;
-}
-
-/**
- * @brief Synchronous transfer of \ref data_t array with the request structure. The server sends the data back in the result.
- *
- * This method attaches the entire request buffer to a request
- * and sends it to the server. This forces the client to encode
- * the buffer before sending, and it makes the size of the request
- * large, depending on the size of the data array.
- *
- * @param svc The service description of the remote service.
- * @param array The data array to transfer.
- */
-int xfer_read_rdma_blk(
- const nssi_service *svc,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- data_array_t *put_buf)
-{
- int rc = NSSI_OK;
- int rc2 = NSSI_OK;
- nssi_request req;
-
- /* call the async function */
- rc = xfer_read_rdma(svc, len, seed, validate, put_buf, &req);
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "unable to call async method: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- /* wait for completion */
- rc2 = nssi_wait(&req, &rc);
- if (rc2 != NSSI_OK) {
- log_error(client_debug_level, "failed waiting for request: %s",
- nssi_err_str(rc));
- return rc2;
- }
-
- if (rc != NSSI_OK) {
- log_error(client_debug_level, "remote method failed: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- return rc;
-
-}
-
-
-
-int read_contact_info(const char *fname, char *url, int maxlen)
-{
- const char *contact_filename=NULL;
- FILE *cf=NULL;
-
- if ((fname==NULL) || (fname[0]=='\0')) {
- contact_filename=getenv("NNTI_CONTACT_FILENAME");
- } else {
- contact_filename=fname;
- }
- if (contact_filename==NULL) {
- url[0]='\0';
- return(-1);
- }
- cf=fopen(contact_filename, "r");
- if (cf == NULL) {
- url[0]='\0';
- return(1);
- }
- if (fgets(url, maxlen, cf) == NULL) {
- log_error(client_debug_level, "failed to read URL from %s", fname);
- }
- fclose(cf);
-
- return(0);
-}
-
-
-
-
-/**
- * @brief Main code for data transfer client.
- *
- * @param args The options for the experiment, set at the command-line
- * @param xfer_svc The nssi_service descriptor for the remote service (already connected)
- * @param comm The communicator for the client application
- */
-int
-xfer_client_main (struct xfer_args &args, nssi_service &xfer_svc, MPI_Comm client_comm)
-{
- using namespace std;
-
- int rc;
- int i,j;
- double time;
- double start_time;
- std::ofstream result_stream;
- log_level debug_level = args.debug_level;
- int client_rank, client_size;
-
- /* the array of results (for async experiments) */
- std::vector results;
-
- xfer_read_encode_res *res4=NULL;
-
- std::vector timings;
- std::vector timings_desc;
-
- /* unique to each process */
- int num_reqs;
-
-
- MPI_Comm_rank(client_comm, &client_rank);
- MPI_Comm_size(client_comm, &client_size);
-
-
- /* divide the requests among the processors */
- num_reqs = args.num_reqs;
- /* the array of requests (for async experiments) */
- std::vector < nssi_request > reqs(num_reqs);
-
- /* open the result file */
- if (client_rank == 0) {
-
- if (!args.result_file.empty()) {
-
- if (args.result_file_mode.compare("a") == 0)
- result_stream.open(args.result_file.c_str(), fstream::out | fstream::app);
- else
- result_stream.open(args.result_file.c_str(), fstream::out);
-
- if (!result_stream.is_open()) {
- log_warn(client_debug_level,
- "invalid result file:"
- "defaults to stdout");
- }
- }
- }
-
- /* register the XDR encoding functions */
- NSSI_REGISTER_CLIENT_STUB(XFER_WRITE_ENCODE_OP, xfer_write_encode_args, void, void);
- NSSI_REGISTER_CLIENT_STUB(XFER_WRITE_RDMA_OP, xfer_write_rdma_args, void, void);
- NSSI_REGISTER_CLIENT_STUB(XFER_READ_ENCODE_OP, xfer_read_encode_args, void, xfer_read_encode_res);
- NSSI_REGISTER_CLIENT_STUB(XFER_READ_RDMA_OP, xfer_read_rdma_args, void, void);
-
-
- /* allocate space for the data arrays used for testing */
- std::vector array_vec;
- array_vec.reserve(args.num_reqs); // async jobs need num_reqs arrays
-
- for (i=0; iarray, &array_vec[j]);
- if (rc != 0) {
- log_error(client_debug_level, "Validation failed");
- MPI_Abort(MPI_COMM_WORLD, rc);
- }
- }
-
- if (res4->array.data_array_t_val) free(res4->array.data_array_t_val);
- }
-
- break;
- }
-
- case XFER_READ_ENCODE_ASYNC:
- {
- /* submit requests */
- res4 = (xfer_read_encode_res *)malloc(args.num_reqs * sizeof(xfer_read_encode_res));
- for (j=0; j
-#include
-
-#include "Trios_logger.h"
-
-
-
-enum IO_METHODS {
- XFER_WRITE_ENCODE_SYNC = 0,
- XFER_WRITE_ENCODE_ASYNC,
- XFER_WRITE_RDMA_SYNC,
- XFER_WRITE_RDMA_ASYNC,
- XFER_READ_ENCODE_SYNC,
- XFER_READ_ENCODE_ASYNC,
- XFER_READ_RDMA_SYNC,
- XFER_READ_RDMA_ASYNC
-};
-
-enum DIST_SCHEME {
- XFER_BLOCK_DISTRIBUTION,
- XFER_ROUND_ROBIN_DISTRIBUTION
-};
-
-enum MPI_IO_METHODS {
- XFER_MPI_SEND=0,
- XFER_MPI_ISEND,
- XFER_MPI_RECV,
- XFER_MPI_IRECV,
- XFER_MPI_PUT,
- XFER_MPI_GET
-};
-
-
-/**
- * Options and arguments passed to the client driver.
- */
-struct xfer_args {
- bool client_flag;
- bool server_flag;
- int num_servers; // used for the server only
- int num_threads; // used for the server only
- bool block_distribution; // how to assign clients to servers
- std::string server_url;
- int transport;
- std::string transport_name;
- int len;
- int io_method;
- std::string url_file;
- std::string io_method_name;
- log_level debug_level;
- std::string logfile;
- int num_trials;
- int num_reqs;
- std::string result_file;
- std::string result_file_mode;
- int timeout;
- int delay;
- int num_retries;
- bool validate_flag;
- bool kill_server_flag;
-};
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__STDC__) || defined(__cplusplus)
-
-
-
-#else /* K&R C */
-#endif
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* XFER_CLIENT_H_ */
diff --git a/packages/trios/examples/xfer-service/xfer_debug.cpp b/packages/trios/examples/xfer-service/xfer_debug.cpp
deleted file mode 100644
index 0cee02c12dc8..000000000000
--- a/packages/trios/examples/xfer-service/xfer_debug.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/**
- * @file xfer_debug.cpp
- *
- */
-
-#include "Trios_logger.h"
-#include "xfer_debug.h"
-
-/**
- * Initialize the xfer_debug_level variable to LOG_UNDEFINED. This
- * tells the logger to use the value set by logger_init, if called.
- */
-log_level xfer_debug_level = LOG_UNDEFINED;
diff --git a/packages/trios/examples/xfer-service/xfer_debug.h b/packages/trios/examples/xfer-service/xfer_debug.h
deleted file mode 100644
index 8e794e0405b6..000000000000
--- a/packages/trios/examples/xfer-service/xfer_debug.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*
- * xfer_client.h
- *
- * Created on: Aug 22, 2011
- * Author: raoldfi
- */
-
-#ifndef XFER_DEBUG_H_
-#define XFER_DEBUG_H_
-
-#include "Trios_logger.h"
-
-extern log_level xfer_debug_level;
-
-#endif /* XFER_CLIENT_H_ */
diff --git a/packages/trios/examples/xfer-service/xfer_mpi_client.cpp b/packages/trios/examples/xfer-service/xfer_mpi_client.cpp
deleted file mode 100644
index 3c35e2be3235..000000000000
--- a/packages/trios/examples/xfer-service/xfer_mpi_client.cpp
+++ /dev/null
@@ -1,567 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/**
- * @file xfer-client.cpp
- *
- */
-
-/**
- * @defgroup xfer_client Data Transfer Client
- *
- * @ingroup xfer_example
- *
- * @{
- */
-
-#include "Trios_config.h"
-#include "Trios_nssi_client.h"
-#include "Trios_logger.h"
-#include "Trios_timer.h"
-
-#include "xfer_client.h"
-#include "xfer_debug.h"
-#include "xfer_util.h"
-
-
-#include
-#include
-#include
-#include
-#include
-
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "Teuchos_CommandLineProcessor.hpp"
-
-#include "xfer_service_args.h"
-
-
-
-log_level client_debug_level = LOG_UNDEFINED;
-
-
-extern int print_args(
- std::ostream &out,
- const struct xfer_args &args,
- const char *prefix);
-
-
-
-/**
- * @brief Transfer an array of data structures using the MPI send/receive functions.
- *
- *
- * @param len The service description of the remote service.
- * @param array The data array to transfer.
- * @param req The \ref nssi_request returned to caller.
- */
-int xfer_mpi_send(
- const int server_rank,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- data_array_t *array)
-{
- int rc = 0;
- MPI_Status status;
- log_level debug_level = xfer_debug_level;
- int rank;
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
- int req_buf[3];
- req_buf[0] = len;
- req_buf[1] = seed;
- req_buf[2] = (int)validate;
-
- int nbytes = len * sizeof(struct data_t);
-
- log_debug(debug_level, "%d: Sending send req (len=%d, seed=%d, validate=%d)", rank, len, seed, validate);
-
- // The request is just an MPI send with the number of elements
- rc = MPI_Send(req_buf, 3, MPI_INT, server_rank, XFER_MPI_SEND_REQ_TAG, MPI_COMM_WORLD);
-
- log_debug(debug_level, "%d: Waiting for ack from %d to before sending data", rank, server_rank);
- // Receive an ack that the server is ready
- MPI_Recv(&rc, 0, MPI_INT, server_rank, XFER_MPI_SEND_ACK_TAG, MPI_COMM_WORLD, &status);
-
-
- log_debug(debug_level, "%d: Send data: %d structs, %d bytes to %d", rank, len, nbytes, server_rank);
-
- // Now we send the data
- rc = MPI_Send(&array->data_array_t_val[0], nbytes,
- MPI_BYTE, server_rank, XFER_MPI_SEND_DATA_TAG, MPI_COMM_WORLD);
-
- return rc;
-}
-
-
-/**
- * @brief Transfer an array of data structures using the MPI send/receive functions.
- *
- *
- * @param len The service description of the remote service.
- * @param array The data array to transfer.
- * @param req The \ref nssi_request returned to caller.
- */
-int xfer_mpi_isend(
- const int server_rank,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- const data_array_t *array,
- MPI_Request *req)
-{
- int rc = 0;
- int rank;
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Status status;
- log_level debug_level = xfer_debug_level;
-
- int req_buf[3];
- req_buf[0] = (int)len;
- req_buf[1] = (int)seed;
- req_buf[2] = (int)validate;
-
- int nbytes = len * sizeof(data_t);
-
- log_debug(debug_level, "%d: Sending isend req (len=%d, seed=%d, validate=%d)", rank, len, seed, validate);
- rc = MPI_Send(req_buf, 3, MPI_INT, server_rank, XFER_MPI_ISEND_REQ_TAG, MPI_COMM_WORLD);
-
- // Receive an ack that the server is ready
- MPI_Recv(&rc, 0, MPI_INT, server_rank, XFER_MPI_ISEND_ACK_TAG, MPI_COMM_WORLD, &status);
-
- log_debug(debug_level, "%d: Isend data: %d structs, %d bytes", rank, len, nbytes);
- rc = MPI_Isend(array->data_array_t_val, nbytes, MPI_BYTE, server_rank, XFER_MPI_ISEND_DATA_TAG, MPI_COMM_WORLD, req);
-
- return rc;
-}
-
-
-/**
- * @brief Transfer an array of data structures using the MPI put functions.
- *
- *
- * @param len The service description of the remote service.
- * @param array The data array to transfer.
- * @param req The \ref nssi_request returned to caller.
- */
-int xfer_mpi_put(
- const int server_rank,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- const data_array_t *array)
-{
- int rc = 0;
- int rank;
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Win win;
-
- int req_buf[3];
- req_buf[0] = (int)len;
- req_buf[1] = (int)seed;
- req_buf[2] = (int)validate;
- int nbytes = len * sizeof(data_t);
-
- log_level debug_level = xfer_debug_level;
-
-
- log_debug(debug_level, "%d: Sending put req (len=%d, seed=%d, validate=%d)", rank, len, seed, validate);
- rc = MPI_Send(req_buf, 3, MPI_INT, server_rank, XFER_MPI_PUT_REQ_TAG, MPI_COMM_WORLD);
-
- // The window on this side is not used to receive data
- MPI_Win_create(NULL, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win);
-
- MPI_Win_fence(0, win);
-
-
- log_debug(debug_level, "%d: Put data: %d structs, %d bytes, val[0]=%d", rank, len, nbytes,
- array->data_array_t_val[0].int_val);
-
- // Put the data from this window into a buffer on the server
- MPI_Put(array->data_array_t_val, nbytes, MPI_BYTE, server_rank, 0, nbytes, MPI_BYTE, win);
-
- // This makes sure the operations are complete
- MPI_Win_fence(0, win);
-
- MPI_Win_free(&win);
-
- return rc;
-}
-
-
-/**
- * @brief Transfer an array of data structures using the MPI put functions.
- *
- *
- * @param len The service description of the remote service.
- * @param array The data array to transfer.
- * @param req The \ref nssi_request returned to caller.
- */
-int xfer_mpi_get(
- const int server_rank,
- const uint32_t len,
- const uint32_t seed,
- const bool validate,
- const data_array_t *array)
-{
- int rc = 0;
- int rank;
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Win win;
-
- int req_buf[3];
- req_buf[0] = (int)len;
- req_buf[1] = (int)seed;
- req_buf[2] = (int)validate;
- int nbytes = len * sizeof(data_t);
-
- log_level debug_level = xfer_debug_level;
-
-
- log_debug(debug_level, "%d: Sending put req (len=%d, seed=%d, validate=%d)", rank, len, seed, validate);
- rc = MPI_Send(req_buf, 3, MPI_INT, server_rank, XFER_MPI_GET_REQ_TAG, MPI_COMM_WORLD);
-
- // The window on this side is not used to receive data
- MPI_Win_create(NULL, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win);
-
- MPI_Win_fence(0, win);
-
-
- log_debug(debug_level, "%d: Get data: %d structs, %d bytes, val[0]=%d", rank, len, nbytes,
- array->data_array_t_val[0].int_val);
-
- // Put the data from this window into a buffer on the server
- MPI_Get(array->data_array_t_val, nbytes, MPI_BYTE, server_rank, 0, nbytes, MPI_BYTE, win);
-
- // This makes sure the operations are complete
- MPI_Win_fence(0, win);
-
- MPI_Win_free(&win);
-
- return rc;
-}
-
-/**
- * @brief Main code for data transfer client.
- *
- * @param args The options for the experiment, set at the command-line
- * @param xfer_svc The nssi_service descriptor for the remote service (already connected)
- * @param comm The communicator for the client application
- */
-int
-xfer_mpi_client_main (struct xfer_args &args, const int server_rank, MPI_Comm client_comm)
-{
- using namespace std;
-
- int rc;
- int i,j;
- double time;
- double start_time;
- std::ofstream result_stream;
- log_level debug_level = xfer_debug_level;
- int client_rank, client_size;
- int global_rank, global_size;
-
- /* the array of results (for async experiments) */
- std::vector results;
-
- xfer_read_encode_res *res4=NULL;
-
- std::vector timings;
- std::vector timings_desc;
-
- /* unique to each process */
- int num_reqs;
-
- MPI_Comm_rank(MPI_COMM_WORLD, &global_rank);
- MPI_Comm_size(MPI_COMM_WORLD, &global_size);
-
- MPI_Comm_rank(client_comm, &client_rank);
- MPI_Comm_size(client_comm, &client_size);
-
- log_debug(debug_level, "%d: Starting client", global_rank);
-
- /* initialize logger */
-// if (args.logfile.empty()) {
-// logger_init(args.debug_level, NULL);
-// debug_level = args.debug_level;
-// } else {
-// char fn[1024];
-// sprintf(fn, "%s.%03d.log", args.logfile.c_str(), client_rank);
-// logger_init(args.debug_level, fn);
-// debug_level = args.debug_level;
-// }
-
-
- /* divide the requests among the processors */
- num_reqs = args.num_reqs;
- /* the array of requests (for async experiments) */
- std::vector < MPI_Request > reqs(num_reqs);
- std::vector < MPI_Status > status(num_reqs);
-
- /* open the result file */
- if (client_rank == 0) {
-
- if (!args.result_file.empty()) {
-
- if (args.result_file_mode.compare("a") == 0)
- result_stream.open(args.result_file.c_str(), fstream::out | fstream::app);
- else
- result_stream.open(args.result_file.c_str(), fstream::out);
-
- if (!result_stream.is_open()) {
- log_warn(client_debug_level,
- "invalid result file:"
- "defaults to stdout");
- }
- }
- }
-
-
- /* allocate space for the data arrays used for testing */
- std::vector array_vec;
- array_vec.reserve(args.num_reqs); // async jobs need num_reqs arrays
-
- for (i=0; i
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-
-
-#include
-
-log_level xfer_debug_level = LOG_UNDEFINED;
-
-/**
- * @brief Send the data through the MPI_Send function
- *
- * @param len Number of data structures sent.
- * @param source MPI rank of the sending process.
- */
-int process_mpi_send(
- const int len,
- const int seed,
- const int validate,
- const int source)
-{
- int nbytes = len*sizeof(data_t);
- MPI_Request req;
- int rank;
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
- log_level debug_level = xfer_debug_level;
- int rc = 0;
- MPI_Status status;
-
- log_debug(debug_level, "%d: starting process_mpi_send(len=%d, seed=%d, validate=%d)", rank, len, seed, validate);
-
-
- // Allocate space for the incoming buffer
- data_array_t array;
- array.data_array_t_len = len;
- array.data_array_t_val = new data_t[len];
-
-
- log_debug(debug_level, "%d: Server Posting IRECV for %d structs, %d bytes, tag=%d",
- rank, len, nbytes, XFER_MPI_SEND_DATA_TAG);
-
- // Post a receive for the buffer of ''len'' elements
- MPI_Irecv(array.data_array_t_val, nbytes, MPI_BYTE, source, XFER_MPI_SEND_DATA_TAG, MPI_COMM_WORLD, &req);
-
- log_debug(debug_level, "%d: Server Sending \"READY ACK\" to %d", rank, source);
-
- // Send an ack to the client that the server is ready
- rc = MPI_Send(&rc, 0, MPI_INT, source, XFER_MPI_SEND_ACK_TAG, MPI_COMM_WORLD);
-
- log_debug(debug_level, "%d: Server is waiting for data from %d, rc=%d", rank, source, rc);
-
- // Wait for the data to arrive
- rc = MPI_Wait(&req, &status);
- log_debug(debug_level, "%d: MPI_Wait complete: rc=%d, status.MPI_ERROR=%d, status.MPI_SOURCE=%d",
- rank, rc, status.MPI_ERROR, status.MPI_SOURCE);
-
- if (validate) {
- rc = xfer_validate_array(seed, &array);
- if (rc != 0)
- log_warn(debug_level, "Invalid array");
- }
-
- // free the memory
- delete [] array.data_array_t_val;
-
- return rc;
-}
-
-
-/**
- * @brief Send the data through the MPI_Send function
- *
- * @param len Number of data structures sent.
- * @param source MPI rank of the sending process.
- */
-int process_mpi_isend(
- const int len,
- const int seed,
- const int validate,
- const int source)
-{
- int nbytes = len*sizeof(data_t);
-
- log_level debug_level = xfer_debug_level;
- int rc=0;
- MPI_Status status;
- MPI_Request req;
- int rank;
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
- log_debug(debug_level, "%d: starting process_mpi_isend(len=%d, seed=%d, validate=%d)", rank, len, seed, validate);
-
-
- // Allocate space for the incoming buffer
- data_array_t array;
- array.data_array_t_len = len;
- array.data_array_t_val = new data_t[len];
-
- log_debug(debug_level, "Posting IRECV");
-
- // Post a receive for the buffer of ''len'' elements
- MPI_Irecv(array.data_array_t_val, nbytes, MPI_BYTE, source, XFER_MPI_ISEND_DATA_TAG, MPI_COMM_WORLD, &req);
-
- log_debug(debug_level, "Sending \"READY ACK\"");
-
- // Send an ack to the client that the server is ready
- MPI_Send(&rc, 0, MPI_INT, source, XFER_MPI_ISEND_ACK_TAG, MPI_COMM_WORLD);
-
- log_debug(debug_level, "Waiting for data");
-
- // Wait for the data to arrive
- MPI_Wait(&req, &status);
-
- if (validate) {
- rc = xfer_validate_array(seed, &array);
- if (rc != 0)
- log_warn(debug_level, "Invalid array");
- }
-
- // Do we need to send a result?
- delete [] array.data_array_t_val;
-
- return rc;
-}
-
-
-/**
- * @brief Send the data through the MPI_Put function
- *
- * @param len Number of data structures sent.
- * @param source MPI rank of the sending process.
- */
-int process_mpi_put(
- const int len,
- const int seed,
- const int validate,
- const int source)
-{
- log_level debug_level = xfer_debug_level;
- int rc = 0;
- MPI_Win win;
- int rank;
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
- log_debug(debug_level, "%d: starting process_mpi_put(len=%d, seed=%d, validate=%d)",
- rank, len, seed, validate);
-
- // Allocate space for the incoming buffer
- data_array_t array;
- array.data_array_t_len = len;
- array.data_array_t_val = new data_t[len];
-
- log_debug(debug_level, "%d: creating window", rank);
-
-
- // Collective call to create a window for the data being transferred (like registering the memory)
- MPI_Win_create(array.data_array_t_val, sizeof(data_t)*len,
- 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win);
-
-
- MPI_Win_fence(0, win);
- log_debug(debug_level, "Waiting for data");
- MPI_Win_fence(0, win);
-
-
- log_debug(debug_level, "Data should be here... validate if necessary, val[0]=%d",array.data_array_t_val[0].int_val);
-
- if (validate) {
- rc = xfer_validate_array(seed, &array);
- if (rc == 0) {
- log_info(debug_level, "Validate Passed");
- }
- else {
- log_warn(debug_level, "Invalid array");
- }
-
- log_info(debug_level, "after validate, rc=%d", rc);
- }
-
-
- // clean up
- MPI_Win_free(&win);
-
-
- delete [] array.data_array_t_val;
-
-
- return rc;
-}
-
-
-/**
- * @brief Client reads the data using the MPI_Get function
- *
- * @param len Number of data structures sent.
- * @param source MPI rank of the sending process.
- */
-int process_mpi_get(
- const int len,
- const int seed,
- const int validate,
- const int source)
-{
- log_level debug_level = xfer_debug_level;
- int rc = 0;
- MPI_Win win;
- int rank;
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
- log_debug(debug_level, "%d: starting process_mpi_get(len=%d, seed=%d, validate=%d)",
- rank, len, seed, validate);
-
- // Allocate space for the incoming buffer
- data_array_t array;
- array.data_array_t_len = len;
- array.data_array_t_val = new data_t[len];
-
- log_debug(debug_level, "%d: creating window", rank);
-
- // initialize the array
- if (validate) {
- xfer_init_data_array(seed, &array);
- }
-
- // Collective call to create a window for the data being transferred (like registering the memory)
- MPI_Win_create(array.data_array_t_val, sizeof(data_t)*len,
- 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win);
-
-
- MPI_Win_fence(0, win);
- log_debug(debug_level, "Waiting for client to get data");
- MPI_Win_fence(0, win);
-
-
- log_debug(debug_level, "Data should be transferred");
-
-
- // clean up
- MPI_Win_free(&win);
-
-
- delete [] array.data_array_t_val;
-
-
- return rc;
-}
-
-
-void make_progress(bool is_idle)
-{
- log_debug(xfer_debug_level, "current_time(%llu) is_idle(%llu)", (uint64_t)trios_get_time_ms(), (uint64_t)is_idle);
-
- return;
-}
-
-
-/**
- * @brief The NSSI xfer-server.
- *
- * NSSI has already been initialized and the client already knows the URL of the
- * server. This function simply registers the server methods and starts the
- * service loop. The client will send a request to kill the service upon completion.
- *
- */
-int xfer_mpi_server_main(MPI_Comm server_comm)
-{
- int rc = 0;
-
- log_level debug_level = xfer_debug_level;
- int server_rank;
-
- MPI_Comm_rank(server_comm, &server_rank);
-
- log_debug(debug_level, "%d: Starting server", server_rank);
-
- /* options that can be overriden by the command-line */
- std::string logfile("");
-
- bool done=false;
- MPI_Status status;
-
- // Server loop just waits for requests from any of the clients. The
- // server isn't expecting any particular type of request.
-
- while (!done) {
- int req_buf[3];
-
- log_debug(debug_level, "Waiting for request");
-
- // Receive the next request, the tag identifies the type of request
- MPI_Recv(&req_buf, 3, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
- int len = req_buf[0];
- int seed = req_buf[1];
- int validate = req_buf[2];
-
- log_debug(debug_level, "Server Received Request (source=%d, tag=%d, len=%d, seed=%d, validate=%d)",
- status.MPI_SOURCE, status.MPI_TAG, len, seed, validate);
-
- switch (status.MPI_TAG) {
-
- case XFER_MPI_SEND_REQ_TAG:
- rc = process_mpi_send(len, seed, validate, status.MPI_SOURCE);
- if (rc != 0)
- log_error(debug_level, "Error processing SEND request");
- break;
-
- case XFER_MPI_ISEND_REQ_TAG:
- log_debug(debug_level, "Server Calling ISEND");
- rc = process_mpi_isend(len, seed, validate, status.MPI_SOURCE);
- if (rc != 0)
- log_error(debug_level, "Error processing ISEND request");
- break;
-
- case XFER_MPI_PUT_REQ_TAG:
- log_debug(debug_level, "Server Calling PUT");
- rc = process_mpi_put(len, seed, validate, status.MPI_SOURCE);
- if (rc != 0)
- log_error(debug_level, "Error processing PUT request");
- break;
-
- case XFER_MPI_GET_REQ_TAG:
- log_debug(debug_level, "Server Calling PUT");
- rc = process_mpi_get(len, seed, validate, status.MPI_SOURCE);
- if (rc != 0)
- log_error(debug_level, "Error processing GET request");
- break;
-
- case XFER_MPI_FINI_REQ:
- log_debug(debug_level, "Server Received EXIT");
- done = true;
- break;
-
- default:
- log_error(debug_level, "tag=%d is not supported", status.MPI_TAG);
- return -1;
- }
- }
-
- log_debug(debug_level, "Exiting server");
- return rc;
-}
-
-/**
- * @}
- */
diff --git a/packages/trios/examples/xfer-service/xfer_mpi_test.cpp b/packages/trios/examples/xfer-service/xfer_mpi_test.cpp
deleted file mode 100644
index 7fc2c96b5d47..000000000000
--- a/packages/trios/examples/xfer-service/xfer_mpi_test.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-
-
-/*
- * xfer_service_test.cpp
- *
- * Created on: Aug 22, 2011
- * Author: raoldfi
- */
-
-
-#include "Trios_config.h"
-#include "Trios_nssi_client.h"
-#include "Trios_nssi_xdr.h"
-
-#include "Teuchos_CommandLineProcessor.hpp"
-#include "Teuchos_StandardCatchMacros.hpp"
-#include "Teuchos_oblackholestream.hpp"
-
-#include
-#include "xfer_client.h"
-#include "xfer_debug.h"
-
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-
-// Prototypes for client and server codes
-int xfer_mpi_server_main(MPI_Comm server_comm);
-int xfer_mpi_client_main (struct xfer_args &args, const int server_rank, MPI_Comm client_comm);
-
-
-/* -------------- private methods -------------------*/
-
-
-int print_args(
- std::ostream &out,
- const struct xfer_args &args,
- const char *prefix)
-{
- if (args.client_flag && args.server_flag)
- out << prefix << " ------------ ARGUMENTS (client and server) ----------- " << std::endl;
- else if (args.client_flag && !args.server_flag)
- out << prefix << " ------------ ARGUMENTS (client) ----------- " << std::endl;
- else if (!args.client_flag && args.server_flag)
- out << prefix << " ------------ ARGUMENTS (server) ----------- " << std::endl;
-
- out << prefix << " \tserver-url = " << args.server_url << std::endl;
-
- if (args.client_flag) {
- out << prefix << " \tio-method = " << args.io_method_name << std::endl;
- out << prefix << " \tnum-trials = " << args.num_trials << std::endl;
- out << prefix << " \tnum-reqs = " << args.num_reqs << std::endl;
- out << prefix << " \tlen = " << args.len << std::endl;
- out << prefix << " \tvalidate = " << ((args.validate_flag)?"true":"false") << std::endl;
- out << prefix << " \tresult-file = " <<
- (args.result_file.empty()?"":args.result_file) << std::endl;
- out << prefix << " \tresult-file-mode = " << args.result_file_mode << std::endl;
- }
- out << prefix << " \tdebug = " << args.debug_level << std::endl;
- out << prefix << " \tlogfile = " << args.logfile << std::endl;
- out << prefix << " ----------------------------------- " << std::endl;
-
- return 0;
-}
-
-
-
-
-
-int main(int argc, char *argv[])
-{
- int np=1, rank=0;
- int splitrank, splitsize;
- int rc = 0;
-
- MPI_Init(&argc, &argv);
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Comm_size(MPI_COMM_WORLD, &np);
-
- MPI_Barrier(MPI_COMM_WORLD);
-
- Teuchos::oblackholestream blackhole;
- std::ostream &out = ( rank == 0 ? std::cout : blackhole );
-
- struct xfer_args args;
-
- const int num_io_methods = 6;
- const int io_method_vals[] = {
- XFER_MPI_SEND, XFER_MPI_ISEND,
- XFER_MPI_RECV, XFER_MPI_IRECV,
- XFER_MPI_PUT, XFER_MPI_GET};
- const char * io_method_names[] = {
- "send", "isend",
- "recv", "irecv",
- "put", "get"};
-
-
- // Initialize arguments
- args.len = 1;
- args.delay = 1;
- args.io_method = XFER_MPI_SEND;
- args.debug_level = LOG_WARN;
- args.num_trials = 1;
- args.num_reqs = 1;
- args.result_file_mode = "a";
- args.result_file = "";
- args.url_file = "";
- args.logfile = "";
- args.client_flag = true;
- args.server_flag = true;
- args.timeout = 500;
- args.num_retries = 5;
- args.validate_flag = true;
- args.server_url = "";
-
- bool success = true;
-
- /**
- * We make extensive use of the \ref Teuchos::CommandLineProcessor for command-line
- * options to control the behavior of the test code. To evaluate performance,
- * the "num-trials", "num-reqs", and "len" options control the amount of data transferred
- * between client and server. The "io-method" selects the type of data transfer. The
- * server-url specifies the URL of the server. If running as a server, the server-url
- * provides a recommended URL when initializing the network transport.
- */
- try {
-
- //out << Teuchos::Teuchos_Version() << std::endl << std::endl;
-
- // Creating an empty command line processor looks like:
- Teuchos::CommandLineProcessor parser;
- parser.setDocString(
- "This example program demonstrates a simple data-transfer service "
- "built using the NEtwork Scalable Service Interface (Nessie)."
- );
-
- /* To set and option, it must be given a name and default value. Additionally,
- each option can be given a help std::string. Although it is not necessary, a help
- std::string aids a users comprehension of the acceptable command line arguments.
- Some examples of setting command line options are:
- */
-
- parser.setOption("delay", &args.delay, "time(s) for client to wait for server to start" );
- parser.setOption("timeout", &args.timeout, "time(ms) to wait for server to respond" );
- parser.setOption("len", &args.len, "The number of structures in an input buffer");
- parser.setOption("debug",(int*)(&args.debug_level), "Debug level");
- parser.setOption("logfile", &args.logfile, "log file");
- parser.setOption("num-trials", &args.num_trials, "Number of trials (experiments)");
- parser.setOption("num-reqs", &args.num_reqs, "Number of reqs/trial");
- parser.setOption("result-file", &args.result_file, "Where to store results");
- parser.setOption("result-file-mode", &args.result_file_mode, "Write mode for the result");
- parser.setOption("validate", "no-validate", &args.validate_flag, "Validate the data");
-
- // Set an enumeration command line option for the io_method
-
- parser.setOption("io-method", &args.io_method, num_io_methods, io_method_vals, io_method_names,
- "I/O Methods for the example: \n"
- "\t\t\tsend : Write data using the MPI_Send function\n"
- "\t\t\tisend: Write data using the MPI_Isend function \n"
- "\t\t\trecv : Read data using MPI_Recv function\n"
- "\t\t\tirecv : Read data using the MPI_Irecv function\n"
- "\t\t\tput: Write data using the MPI_Put function\n"
- "\t\t\tget: Read data through the MPI_Get function");
-
-
-
-
- /* There are also two methods that control the behavior of the
- command line processor. First, for the command line processor to
- allow an unrecognized a command line option to be ignored (and
- only have a warning printed), use:
- */
- parser.recogniseAllOptions(true);
-
- /* Second, by default, if the parser finds a command line option it
- doesn't recognize or finds the --help option, it will throw an
- std::exception. If you want prevent a command line processor from
- throwing an std::exception (which is important in this program since
- we don't have an try/catch around this) when it encounters a
- unrecognized option or help is printed, use:
- */
- parser.throwExceptions(false);
-
- /* We now parse the command line where argc and argv are passed to
- the parse method. Note that since we have turned off std::exception
- throwing above we had better grab the return argument so that
- we can see what happened and act accordingly.
- */
- Teuchos::CommandLineProcessor::EParseCommandLineReturn parseReturn= parser.parse( argc, argv );
-
- if( parseReturn == Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED ) {
- return 0;
- }
-
- if( parseReturn != Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL ) {
- return 1; // Error!
-
- }
-
- // Here is where you would use these command line arguments but for this example program
- // we will just print the help message with the new values of the command-line arguments.
- //if (rank == 0)
- // out << "\nPrinting help message with new values of command-line arguments ...\n\n";
-
- //parser.printHelpMessage(argv[0],out);
-
- }
-
- TEUCHOS_STANDARD_CATCH_STATEMENTS(true,std::cerr,success);
-
- log_debug(args.debug_level, "%d: Finished processing arguments", rank);
-
-
- if (!success) {
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
-
- if (!args.server_flag && args.client_flag) {
- /* initialize logger */
- if (args.logfile.empty()) {
- logger_init(args.debug_level, NULL);
- } else {
- char fn[1024];
- sprintf(fn, "%s.client.%03d.log", args.logfile.c_str(), rank);
- logger_init(args.debug_level, fn);
- }
- } else if (args.server_flag && !args.client_flag) {
- /* initialize logger */
- if (args.logfile.empty()) {
- logger_init(args.debug_level, NULL);
- } else {
- char fn[1024];
- sprintf(fn, "%s.server.%03d.log", args.logfile.c_str(), rank);
- logger_init(args.debug_level, fn);
- }
- } else if (args.server_flag && args.client_flag) {
- /* initialize logger */
- if (args.logfile.empty()) {
- logger_init(args.debug_level, NULL);
- } else {
- char fn[1024];
- sprintf(fn, "%s.%03d.log", args.logfile.c_str(), rank);
- logger_init(args.debug_level, fn);
- }
- }
-
- log_level debug_level = args.debug_level;
- debug_level = xfer_debug_level;
-
- // Communicator used for both client and server (may split if using client and server)
- MPI_Comm comm;
-
- log_debug(debug_level, "%d: Starting xfer-mpi test", rank);
-
-
- /**
- * We need to play some fancy MPI games to get the communicators working correctly.
- * We're running as both a client and a server in the same app, so we need to
- * split the communicator so that the client can barrier sync without involving the server.
- */
- if (np < 2) {
- log_error(debug_level, "Must use at least 2 MPI processes for client and server mode");
- MPI_Abort(MPI_COMM_WORLD, -1);
- }
-
- // Split the communicators. Processors with color=0 are servers.
- int server_rank = 0;
- int color = (rank == server_rank) ? 0 : 1; // only one server
- MPI_Comm_split(MPI_COMM_WORLD, color, rank, &comm);
-
- MPI_Comm_rank(comm, &splitrank);
- MPI_Comm_size(comm, &splitsize);
-
-// std::cout << "rank=" << rank << "/" << np << ", color=" << color <<
-// ", new_rank=" << splitrank << "/" << splitsize << std::endl << std::endl;
-
-
-
- // Set the debug level for the xfer service.
- xfer_debug_level = args.debug_level;
-
- // Print the arguments after they've all been set.
- args.io_method_name = io_method_names[args.io_method];
- print_args(out, args, "%");
-
-
- //------------------------------------------------------------------------------
- /** If we're running this job with a server, the server always executes on node 0.
- * In this example, the server is a single process.
- */
- if (rank == server_rank) {
- rc = xfer_mpi_server_main(comm);
- log_debug(debug_level, "Server is finished, rc=%d", rc);
- }
-
- // ------------------------------------------------------------------------------
- /** The parallel client will execute this branch. */
- else {
- log_debug(debug_level, "Starting client main");
- // Start the client code
- rc = xfer_mpi_client_main(args, server_rank, comm);
- log_debug(debug_level, "Client is finished, rc=%d", rc);
- }
-
- MPI_Barrier(MPI_COMM_WORLD);
-
- log_debug(debug_level, "%d: MPI_Finalize()", rank);
- MPI_Finalize();
-
-
- if (!success) {
- log_warn(debug_level, "%d: success=FALSE", rank);
- }
- if (rc != 0) {
- log_warn(debug_level, "%d: rc=%d", rank, rc);
- }
-
- if(success && (rc == 0))
- out << "\nEnd Result: TEST PASSED" << std::endl;
- else
- out << "\nEnd Result: TEST FAILED" << std::endl;
-
- return ((success && (rc==NSSI_OK)) ? 0 : 1 );
-}
diff --git a/packages/trios/examples/xfer-service/xfer_server.cpp b/packages/trios/examples/xfer-service/xfer_server.cpp
deleted file mode 100644
index 82f36d7f82fb..000000000000
--- a/packages/trios/examples/xfer-service/xfer_server.cpp
+++ /dev/null
@@ -1,451 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/** @file xfer-server.cpp
- *
- * @brief Example data transfer server.
- *
- * @author Ron Oldfield (raoldfi\@sandia.gov).
- */
-
-/**
- * @defgroup xfer_server Data Transfer Server
- *
- * @ingroup xfer_example
- *
- * @{
- */
-
-#include "Trios_config.h"
-#include "Trios_nssi_client.h"
-//#include "nssi_types.h"
-#include "Trios_nssi_server.h"
-#include "Trios_logger.h"
-#include "Trios_timer.h"
-#include "Trios_nssi_debug.h"
-
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "xfer_util.h"
-#include "xfer_threads.h"
-
-
-
-#include
-
-log_level xfer_debug_level = LOG_UNDEFINED;
-
-
-/**
- * @brief Emulate a write operation where all the data is sent
- * through the function arguments.
- *
- * Transfer an array of data structures to the server through the
- * procedure arguments, forcing the client to encode the array before
- * sending and the server to decode the array when receiving. We use
- * this method to evaluate the performance of the encoding/decoding the arguments.
- * For large arrays, this method also tests our two-phase transfer protocol in
- * which the client pushes a small header of arguments and lets the server pull the
- * remaining arguments on demand.
- *
- * @param request_id ID of the request.
- * @param caller The process ID of the calling process.
- * @param args Arguments passed with the request.
- * @param data_addr The remote memory descriptor for the data (not used).
- * @param res_addr The remote memory descriptor for the result.
- */
-int xfer_write_encode_srvr(
- const unsigned long request_id,
- const NNTI_peer_t *caller,
- const xfer_write_encode_args *args,
- const NNTI_buffer_t *data_addr,
- const NNTI_buffer_t *res_addr)
-{
- const int len = args->len;
- const long int seed = args->seed;
- const bool validate = args->validate;
-
- int nbytes = len*sizeof(data_t);
-
- log_level debug_level = xfer_debug_level;
- int rc;
-
- /* process array (nothing to do) */
-
- log_debug(debug_level, "starting xfer_write_encode_srvr");
-
- /* Validate the array that was sent through the args */
- if (validate) {
- data_array_t tmp_array;
- tmp_array.data_array_t_len = len;
-
- tmp_array.data_array_t_val = (data_t *)malloc(nbytes);
-
- xfer_init_data_array(seed, &tmp_array);
- rc = xfer_compare_data_arrays(&tmp_array, const_cast(&args->array));
-
- if (rc != 0) {
- log_warn(debug_level, "Unable to validate array");
- }
-
- free(tmp_array.data_array_t_val);
- }
-
-
-
- rc = nssi_send_result(caller, request_id, NSSI_OK, NULL, res_addr);
-
- return rc;
-}
-
-/**
- * @brief Transfer an array of data structures to the server using the data channel.
- *
- * This procedure passes the length of the array in the arguments. The server
- * then ``pulls'' the unencoded data from the client using the \ref nssi_get function.
- * This method evaluates the RDMA transfer performance for the \ref nssi_get_data function.
- *
- * @param request_id ID of the request.
- * @param caller The process ID of the calling process.
- * @param args Arguments passed with the request.
- * @param data_addr The remote memory descriptor for the data.
- * @param res_addr The remote memory descriptor for the result.
- */
-int xfer_write_rdma_srvr(
- const unsigned long request_id,
- const NNTI_peer_t *caller,
- const xfer_write_rdma_args *args,
- const NNTI_buffer_t *data_addr,
- const NNTI_buffer_t *res_addr)
-{
- int rc = NSSI_OK;
- log_level debug_level = xfer_debug_level;
-
- const int len = args->len;
- const long int seed = args->seed;
- const bool validate = args->validate;
-
- int nbytes = len*sizeof(data_t);
-
- log_debug(debug_level, "starting xfer_write_rdma_srvr");
-
- /* allocate space for the incoming buffer */
- data_array_t array;
- array.data_array_t_len = len;
- array.data_array_t_val = (data_t *)malloc(nbytes);
- memset(array.data_array_t_val, 0, nbytes);
-
- log_debug(debug_level, "getting data from client (%s)", caller->url);
-
- /* now we need to fetch the data from the client */
- rc = nssi_get_data(caller, array.data_array_t_val, nbytes, data_addr);
- if (rc != NSSI_OK) {
- log_warn(debug_level, "could not fetch data from client");
- return rc;
- }
-
- /* Validate the array */
- if (validate && (rc == 0)) {
- data_array_t tmp_array;
- tmp_array.data_array_t_len = len;
- tmp_array.data_array_t_val = (data_t *)malloc(nbytes);
-
- xfer_init_data_array(seed, &tmp_array);
- rc = xfer_compare_data_arrays(&tmp_array, &array);
-
- if (rc != 0) {
- log_warn(debug_level, "Unable to validate array");
- }
-
- free(tmp_array.data_array_t_val);
- }
-
- rc = nssi_send_result(caller, request_id, rc, NULL, res_addr);
-
- free(array.data_array_t_val);
-
- return rc;
-}
-
-
-
-/**
- * @brief Transfer an array of data structures to the client
- * using the control channel.
- *
- * This method tells the server to send the data array to the
- * client through the result data structure, forcing the server
- * to encode the array before sending and the client to decode the array
- * when receiving. This procedure evaluates the performance of the encoding/decoding
- * the arguments. For large arrays, this method also tests our two-phase transfer
- * protocol for the result structure in which the server pushes a small header of
- * the result and lets the client pull the remaining result on demand (at the
- * \ref nssi_wait function).
- *
- * @param request_id ID of the request.
- * @param caller The process ID of the calling process.
- * @param args Arguments passed with the request.
- * @param data_addr The remote memory descriptor for the data.
- * @param res_addr The remote memory descriptor for the result.
- */
-int xfer_read_encode_srvr(
- const unsigned long request_id,
- const NNTI_peer_t *caller,
- const xfer_read_encode_args *args,
- const NNTI_buffer_t *data_addr,
- const NNTI_buffer_t *res_addr)
-{
- int rc = NSSI_OK;
- log_level debug_level = xfer_debug_level;
-
- const int len = args->len;
- const int seed = args->seed;
- const bool validate = args->validate;
- int nbytes = len*sizeof(data_t);
-
- xfer_read_encode_res res;
-
- log_debug(debug_level, "starting xfer_read_encode_srvr");
-
- memset(&res, 0, sizeof(res));
-
- /* allocate space for the outgoing buffer */
- res.array.data_array_t_val = (data_t *)malloc(nbytes);
- res.array.data_array_t_len = len;
-
- if (validate) {
- xfer_init_data_array(seed, &res.array);
- }
-
- rc = nssi_send_result(caller, request_id, NSSI_OK, &res, res_addr);
-
- free(res.array.data_array_t_val);
-
- return rc;
-}
-
-/**
- * @brief Emulate a read operation where the bulk data is sent using
- * the \ref nssi_put function.
- *
- * Transfer an array of data structures to the client using the data
- * channel. This procedure passes the length of the array in the arguments.
- * The server then ``puts'' the unencoded data into the client memory using
- * the \ref nssi_put_data function. This method evaluates the RDMA
- * transfer performance for \ref nssi_put_data.
- *
- * @param request_id ID of the request.
- * @param caller The process ID of the calling process.
- * @param args Arguments passed with the request.
- * @param data_addr The remote memory descriptor for the data (not used).
- * @param res_addr The remote memory descriptor for the result.
- */
-int xfer_read_rdma_srvr(
- const unsigned long request_id,
- const NNTI_peer_t *caller,
- const xfer_read_rdma_args *args,
- const NNTI_buffer_t *data_addr,
- const NNTI_buffer_t *res_addr)
-{
- int rc;
- log_level debug_level = xfer_debug_level;
-
- const bool validate = args->validate;
- const int seed = args->seed;
-
- int nbytes = args->len*sizeof(data_t);
-
- /* allocate space for the outgoing buffer */
- data_array_t array;
- array.data_array_t_len = args->len;
- array.data_array_t_val = (data_t *)malloc(nbytes);
-
- /* process array (nothing to do) */
- log_debug(debug_level, "starting xfer_read_rdma_srvr");
-
- /* if we need to validate the array, it needs to be initialized */
- if (validate) {
- xfer_init_data_array(seed, &array);
- }
-
- log_debug(debug_level, "putting data in client buffer");
-
- /* now we need to put the data to the client */
- rc = nssi_put_data(caller, array.data_array_t_val, nbytes, data_addr, -1);
- if (rc != NSSI_OK) {
- log_warn(debug_level, "could not put data to client");
- return rc;
- }
-
-// for (int idx=0;idx 0) {
- log_debug(xfer_debug_level, "Starting server threads");
-
- xfer_start_server_threads(num_threads, 1000);
-
- // The main thread will execute unit it receives a "kill" request
- rc = nssi_service_start_wfn(&xfer_svc, &xfer_enqueue_rpc_request);
-
- xfer_cancel_server_threads();
- }
- else {
- rc = nssi_service_start(&xfer_svc);
- if (rc != NSSI_OK) {
- log_info(xfer_debug_level, "exited xfer_svc: %s",
- nssi_err_str(rc));
- }
- }
-
-
-
- sleep(5);
-
- /* shutdown the xfer_svc */
- log_debug(xfer_debug_level, "shutting down service library");
- nssi_service_fini(&xfer_svc);
-
-
- return rc;
-}
-
-/**
- * @}
- */
diff --git a/packages/trios/examples/xfer-service/xfer_service_args.x b/packages/trios/examples/xfer-service/xfer_service_args.x
deleted file mode 100644
index 4565583ba242..000000000000
--- a/packages/trios/examples/xfer-service/xfer_service_args.x
+++ /dev/null
@@ -1,249 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/* -------------------------------------------------------------------------- */
-/**
- * @file xfer_xdr.x
- *
- * @brief Type definitions for a simple rpc service.
- *
- * @author Ron Oldfield (raoldfi\@cs.sandia.gov).
- * $Revision: 342 $.
- * $Date: 2005-05-01 23:30:57 -0600 (Sun, 01 May 2005) $.
- *
- */
-
-/**
- * @defgroup xfer_example Nessie Data Transfer Example
- *
- * The data-transfer example demonstrates a simple client
- * and server that transfer an array of 16-byte \ref data_t
- * data structures from a parallel application to a set of
- * servers. We implemented two variations:
- * one that transfers the array of data structures
- * with the request, and a second method that has each server
- * pull the data using the \ref nssi_get_data() function. Although
- * this example is fairly simple, it makes a decent benchmark code
- * to evaluate overheads of the Nessie transfer protocols and encoding
- * schemes.
- *
-*/
-
-/**
- * @defgroup xfer_types Nessie Example Types
- * @ingroup xfer_example
- *
- * @{
- */
-
-/* Extra stuff to put at the beginning of the header file */
-#ifdef RPC_HDR
-%#include "Trios_xdr.h"
-#endif
-
-/* Extra stuff to put at the beginning of the C file. */
-#ifdef RPC_XDR
-%#include "Trios_xdr.h"
-#endif
-
-
-
-/**
- * @brief Opcodes for the types of transfer operations.
- */
-enum xfer_op {
- /** Opcode for writing the data through the function arguments. */
- XFER_WRITE_ENCODE_OP = 1,
- /** Opcode for the writing the data through the data channel. */
- XFER_WRITE_RDMA_OP,
- /** Opcode for reading the data through the result structure. */
- XFER_READ_ENCODE_OP,
- /** Opcode for reading the data throught the data channel. */
- XFER_READ_RDMA_OP
-};
-
-/**
- * @brief Opcodes for the MPI transfer tests
- */
-enum xfer_mpi_tag {
- /** Opcode for blocking send request */
- XFER_MPI_SEND_REQ_TAG = 1001,
- XFER_MPI_SEND_ACK_TAG,
- XFER_MPI_SEND_DATA_TAG,
- /** Opcode for non-blocking send request */
- XFER_MPI_ISEND_REQ_TAG,
- XFER_MPI_ISEND_ACK_TAG,
- XFER_MPI_ISEND_DATA_TAG,
- /** Opcode for blocking recv request */
- XFER_MPI_RECV_REQ_TAG,
- XFER_MPI_RECV_ACK_TAG,
- XFER_MPI_RECV_DATA_TAG,
- /** Opcode for non-blocking recv request */
- XFER_MPI_IRECV_REQ_TAG,
- XFER_MPI_IRECV_ACK_TAG,
- XFER_MPI_IRECV_DATA_TAG,
- /** Opcode for one-sided put request */
- XFER_MPI_PUT_REQ_TAG,
- XFER_MPI_PUT_ACK_TAG,
- XFER_MPI_PUT_DATA_TAG,
- /** Opcode for one-sided get request */
- XFER_MPI_GET_REQ_TAG,
- XFER_MPI_GET_ACK_TAG,
- XFER_MPI_GET_DATA_TAG,
- /** Opcode to quit the server */
- XFER_MPI_FINI_REQ
-};
-
-/**
- * @brief A 16-byte structure that contains an int, float, and double.
- *
- * This structure contains an int, float, and double as an example
- * of a complex structure with multiple types. This will exercise the
- * encoding/decoding features of Nessie.
- */
-struct data_t {
- /** An integer value. */
- uint32_t int_val;
- /** A floating point value. */
- float float_val;
- /** A double value. */
- double double_val;
-};
-
-/**
- * @brief Array of 16-byte structures that we can send with the request.
- *
- * Rpcgen will use this definition to define encoding functions to
- * encode and decode an array of \ref data_t structures. We will
- * use these functions when sending the array with the request.
- */
-typedef data_t data_array_t<>;
-
-/**
- * @brief Arguments for the first transfer operation, XFER_WRITE_ENCODE.
- *
- * The first transfer operation includes the array of \ref data_t
- * structures as an argument of the remote operation. This will
- * cause the array to be sent to the server as part of the request.
- * The client encodes the data before sending it to the server, the server
- * decodes the data structure when it arrives.
- */
-struct xfer_write_encode_args {
- /** The length of the data array. */
- int32_t len;
- /** A seed for initializing the array */
- uint32_t seed;
- /** A flag to perform validation */
- bool validate;
- /** The array of \ref data_t structures, including length. */
- data_array_t array;
-
-};
-
-/**
- * @brief Arguments for the second transfer operation, XFER_WRITE_RDMA.
- *
- * The second transfer operation only needs to send the length
- * of the data array. It uses the data argument in the nssi_call_rpc()
- * to identify the raw data for the server to fetch.
- */
-struct xfer_write_rdma_args {
- /** The length of the data array. */
- int32_t len;
- /** A seed for initializing the array */
- uint32_t seed;
- /** A flag to perform validation */
- bool validate;
-};
-
-
-/**
- * @brief Arguments for the third transfer operation, XFER_READ_ENCODE.
- *
- * The third transfer operation only needs to send the length
- * of the data array. It uses the data argument in the nssi_call_rpc()
- * to identify the raw data for the server to fetch.
- */
-struct xfer_read_encode_args {
- /** The length of the data array. */
- int32_t len;
- /** A value used to initialize the data */
- uint32_t seed;
- /** A flag to perform validation */
- bool validate;
-};
-
-/**
- * @brief Results for the third transfer operation, XFER_READ_ENCODE.
- *
- * The result of the xfer_read_encode operation includes the
- * array of \ref data_t structures. If the size of array is large,
- * the address of array will be sent as part of the result and the
- * client will fetch array via RDMA. In either case, the structures
- * are encoded by the server and decoded by the client.
- */
-struct xfer_read_encode_res {
- /** The array of \ref data_t structures, including length. */
- data_array_t array;
-};
-
-/**
- * @brief Arguments for the fourth transfer operation, XFER_READ_RDMA.
- *
- * The xfer_read_rdma operation includes the array of \ref data_t
- * structures as an argument of the remote operation. This will
- * cause the array to be sent to the server as part of the request.
- */
-struct xfer_read_rdma_args {
- /** The length of the data array. */
- int32_t len;
- /** A seed for initializing the array */
- uint32_t seed;
- /** A flag to perform validation */
- bool validate;
-};
-
-
-
-/**
- * @}
- */
diff --git a/packages/trios/examples/xfer-service/xfer_service_test.cpp b/packages/trios/examples/xfer-service/xfer_service_test.cpp
deleted file mode 100644
index 5a300eb0b634..000000000000
--- a/packages/trios/examples/xfer-service/xfer_service_test.cpp
+++ /dev/null
@@ -1,659 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-
-/*
- * xfer_service_test.cpp
- *
- * Created on: Aug 22, 2011
- * Author: raoldfi
- */
-
-
-#include "Trios_config.h"
-#include "Trios_nssi_client.h"
-#include "Trios_nssi_xdr.h"
-#include "Trios_nssi_debug.h"
-
-#include "Teuchos_CommandLineProcessor.hpp"
-#include "Teuchos_StandardCatchMacros.hpp"
-#include "Teuchos_oblackholestream.hpp"
-
-#include
-#include "xfer_client.h"
-#include "xfer_debug.h"
-#include "xfer_util.h"
-
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-// Prototypes for client and server codes
-int xfer_server_main(nssi_rpc_transport transport, int num_threads, MPI_Comm server_comm);
-int xfer_client_main (struct xfer_args &args, nssi_service &xfer_svc, MPI_Comm client_comm);
-
-
-/* -------------- private methods -------------------*/
-
-
-int print_args(
- std::ostream &out,
- const struct xfer_args &args,
- const char *prefix)
-{
-
- if (args.client_flag && args.server_flag)
- out << prefix << " ------------ ARGUMENTS (client and server) ----------- " << std::endl;
- else if (args.client_flag && !args.server_flag)
- out << prefix << " ------------ ARGUMENTS (client) ----------- " << std::endl;
- else if (!args.client_flag && args.server_flag)
- out << prefix << " ------------ ARGUMENTS (server) ----------- " << std::endl;
-
- out << prefix << " \tserver-url = " << args.server_url.c_str() << std::endl;
- out << prefix << " \turl-file = " << args.url_file << std::endl;
- out << prefix << " \ttransport = " << args.transport_name << std::endl;
-
- if (args.client_flag) {
- out << prefix << " \tio-method = " << args.io_method_name << std::endl;
- out << prefix << " \tnum-trials = " << args.num_trials << std::endl;
- out << prefix << " \tnum-reqs = " << args.num_reqs << std::endl;
- out << prefix << " \tlen = " << args.len << std::endl;
- out << prefix << " \tvalidate = " << ((args.validate_flag)?"true":"false") << std::endl;
- out << prefix << " \tresult-file = " <<
- (args.result_file.empty()?"":args.result_file) << std::endl;
- out << prefix << " \tresult-file-mode = " << args.result_file_mode << std::endl;
- }
- out << prefix << " \tdebug = " << args.debug_level << std::endl;
- out << prefix << " \tlogfile = " << args.logfile << std::endl;
- out << prefix << " ----------------------------------- " << std::endl;
-
- return 0;
-}
-
-
-
-
-
-int main(int argc, char *argv[])
-{
- int np=1, rank=0;
- int splitrank, splitsize;
- int rc = 0;
- nssi_service xfer_svc;
-
- int server_index=0;
- int rank_in_server=0;
-
- int transport_index=-1;
-
- MPI_Init(&argc, &argv);
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Comm_size(MPI_COMM_WORLD, &np);
-
- MPI_Barrier(MPI_COMM_WORLD);
-
- Teuchos::oblackholestream blackhole;
- std::ostream &out = ( rank == 0 ? std::cout : blackhole );
-
- struct xfer_args args;
-
- const int num_io_methods = 8;
- const int io_method_vals[] = {
- XFER_WRITE_ENCODE_SYNC, XFER_WRITE_ENCODE_ASYNC,
- XFER_WRITE_RDMA_SYNC, XFER_WRITE_RDMA_ASYNC,
- XFER_READ_ENCODE_SYNC, XFER_READ_ENCODE_ASYNC,
- XFER_READ_RDMA_SYNC, XFER_READ_RDMA_ASYNC};
- const char * io_method_names[] = {
- "write-encode-sync", "write-encode-async",
- "write-rdma-sync", "write-rdma-async",
- "read-encode-sync", "read-encode-async",
- "read-rdma-sync", "read-rdma-async"};
-
- const int nssi_transport_list[] = {
- NSSI_RPC_PTL,
- NSSI_RPC_PTL,
- NSSI_RPC_IB,
- NSSI_RPC_IB,
- NSSI_RPC_GEMINI,
- NSSI_RPC_GEMINI,
- NSSI_RPC_BGPDCMF,
- NSSI_RPC_BGPDCMF,
- NSSI_RPC_BGQPAMI,
- NSSI_RPC_BGQPAMI,
- NSSI_RPC_MPI};
-
- const int num_nssi_transports = 11;
- const int nssi_transport_vals[] = {
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 10
- };
- const char * nssi_transport_names[] = {
- "portals",
- "ptl",
- "infiniband",
- "ib",
- "gemini",
- "gni",
- "bgpdcmf",
- "dcmf",
- "bgqpami",
- "pami",
- "mpi"
- };
-
-
- // Initialize arguments
- args.transport=NSSI_DEFAULT_TRANSPORT;
- args.len = 1;
- args.delay = 1;
- args.io_method = XFER_WRITE_RDMA_SYNC;
- args.debug_level = LOG_WARN;
- args.num_trials = 1;
- args.num_reqs = 1;
- args.result_file_mode = "a";
- args.result_file = "";
- args.url_file = "";
- args.logfile = "";
- args.client_flag = true;
- args.server_flag = true;
- args.num_servers = 1;
- args.num_threads = 0;
- args.timeout = 500;
- args.num_retries = 5;
- args.validate_flag = true;
- args.kill_server_flag = true;
- args.block_distribution = true;
-
-
- bool success = true;
-
- /**
- * We make extensive use of the \ref Teuchos::CommandLineProcessor for command-line
- * options to control the behavior of the test code. To evaluate performance,
- * the "num-trials", "num-reqs", and "len" options control the amount of data transferred
- * between client and server. The "io-method" selects the type of data transfer. The
- * server-url specifies the URL of the server. If running as a server, the server-url
- * provides a recommended URL when initializing the network transport.
- */
- try {
-
- //out << Teuchos::Teuchos_Version() << std::endl << std::endl;
-
- // Creating an empty command line processor looks like:
- Teuchos::CommandLineProcessor parser;
- parser.setDocString(
- "This example program demonstrates a simple data-transfer service "
- "built using the NEtwork Scalable Service Interface (Nessie)."
- );
-
- /* To set and option, it must be given a name and default value. Additionally,
- each option can be given a help std::string. Although it is not necessary, a help
- std::string aids a users comprehension of the acceptable command line arguments.
- Some examples of setting command line options are:
- */
-
- parser.setOption("delay", &args.delay, "time(s) for client to wait for server to start" );
- parser.setOption("timeout", &args.timeout, "time(ms) to wait for server to respond" );
- parser.setOption("server", "no-server", &args.server_flag, "Run the server" );
- parser.setOption("client", "no-client", &args.client_flag, "Run the client");
- parser.setOption("len", &args.len, "The number of structures in an input buffer");
- parser.setOption("debug",(int*)(&args.debug_level), "Debug level");
- parser.setOption("logfile", &args.logfile, "log file");
- parser.setOption("num-trials", &args.num_trials, "Number of trials (experiments)");
- parser.setOption("num-reqs", &args.num_reqs, "Number of reqs/trial");
- parser.setOption("result-file", &args.result_file, "Where to store results");
- parser.setOption("result-file-mode", &args.result_file_mode, "Write mode for the result");
- parser.setOption("server-url-file", &args.url_file, "File that has URL client uses to find server");
- parser.setOption("validate", "no-validate", &args.validate_flag, "Validate the data");
- parser.setOption("num-servers", &args.num_servers, "Number of server processes");
- parser.setOption("num-threads", &args.num_threads, "Number of threads used by each server process");
- parser.setOption("kill-server", "no-kill-server", &args.kill_server_flag, "Kill the server at the end of the experiment");
- parser.setOption("block-distribution", "rr-distribution", &args.block_distribution,
- "Use a block distribution scheme to assign clients to servers");
-
- // Set an enumeration command line option for the io_method
- parser.setOption("io-method", &args.io_method, num_io_methods, io_method_vals, io_method_names,
- "I/O Methods for the example: \n"
- "\t\t\twrite-encode-sync : Write data through the RPC args, synchronous\n"
- "\t\t\twrite-encode-async: Write data through the RPC args - asynchronous\n"
- "\t\t\twrite-rdma-sync : Write data using RDMA (server pulls) - synchronous\n"
- "\t\t\twrite-rdma-async: Write data using RDMA (server pulls) - asynchronous\n"
- "\t\t\tread-encode-sync : Read data through the RPC result - synchronous\n"
- "\t\t\tread-encode-async: Read data through the RPC result - asynchronous\n"
- "\t\t\tread-rdma-sync : Read data using RDMA (server puts) - synchronous\n"
- "\t\t\tread-rdma-async: Read data using RDMA (server puts) - asynchronous");
-
-
- // Set an enumeration command line option for the NNTI transport
- parser.setOption("transport", &transport_index, num_nssi_transports, nssi_transport_vals, nssi_transport_names,
- "NSSI transports (not all are available on every platform): \n"
- "\t\t\tportals|ptl : Cray or Schutt\n"
- "\t\t\tinfiniband|ib : libibverbs\n"
- "\t\t\tgemini|gni : Cray libugni (Gemini or Aries)\n"
- "\t\t\tbgpdcmf|dcmf : IBM BG/P DCMF\n"
- "\t\t\tbgqpami|pami : IBM BG/Q PAMI\n"
- "\t\t\tmpi : isend/irecv implementation\n"
- );
-
-
-
- /* There are also two methods that control the behavior of the
- command line processor. First, for the command line processor to
- allow an unrecognized a command line option to be ignored (and
- only have a warning printed), use:
- */
- parser.recogniseAllOptions(true);
-
- /* Second, by default, if the parser finds a command line option it
- doesn't recognize or finds the --help option, it will throw an
- std::exception. If you want prevent a command line processor from
- throwing an std::exception (which is important in this program since
- we don't have an try/catch around this) when it encounters a
- unrecognized option or help is printed, use:
- */
- parser.throwExceptions(false);
-
- /* We now parse the command line where argc and argv are passed to
- the parse method. Note that since we have turned off std::exception
- throwing above we had better grab the return argument so that
- we can see what happened and act accordingly.
- */
- Teuchos::CommandLineProcessor::EParseCommandLineReturn parseReturn= parser.parse( argc, argv );
-
- if( parseReturn == Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED ) {
- return 0;
- }
-
- if( parseReturn != Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL ) {
- return 1; // Error!
-
- }
-
- // Here is where you would use these command line arguments but for this example program
- // we will just print the help message with the new values of the command-line arguments.
- //if (rank == 0)
- // out << "\nPrinting help message with new values of command-line arguments ...\n\n";
-
- //parser.printHelpMessage(argv[0],out);
-
- }
-
- TEUCHOS_STANDARD_CATCH_STATEMENTS(true,std::cerr,success);
-
- log_debug(args.debug_level, "transport_index=%d", transport_index);
- if (transport_index > -1) {
- args.transport =nssi_transport_list[transport_index];
- args.transport_name=std::string(nssi_transport_names[transport_index]);
- }
- args.io_method_name=std::string(io_method_names[args.io_method]);
-
- log_debug(args.debug_level, "%d: Finished processing arguments", rank);
-
-
- if (!success) {
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
-
- if (!args.server_flag && args.client_flag) {
- /* initialize logger */
- if (args.logfile.empty()) {
- logger_init(args.debug_level, NULL);
- } else {
- char fn[1024];
- sprintf(fn, "%s.client.%03d.log", args.logfile.c_str(), rank);
- logger_init(args.debug_level, fn);
- }
- } else if (args.server_flag && !args.client_flag) {
- /* initialize logger */
- if (args.logfile.empty()) {
- logger_init(args.debug_level, NULL);
- } else {
- char fn[1024];
- sprintf(fn, "%s.server.%03d.log", args.logfile.c_str(), rank);
- logger_init(args.debug_level, fn);
- }
- } else if (args.server_flag && args.client_flag) {
- /* initialize logger */
- if (args.logfile.empty()) {
- logger_init(args.debug_level, NULL);
- } else {
- char fn[1024];
- sprintf(fn, "%s.%03d.log", args.logfile.c_str(), rank);
- logger_init(args.debug_level, fn);
- }
- }
-
- log_level debug_level = args.debug_level;
-
- // Communicator used for both client and server (may split if using client and server)
- MPI_Comm comm;
-
- log_debug(debug_level, "%d: Starting xfer-service test", rank);
-
-#ifdef TRIOS_ENABLE_COMMSPLITTER
- if (args.transport == NSSI_RPC_MPI) {
- MPI_Pcontrol(0);
- }
-#endif
-
- /**
- * Since this test can be run as a server, client, or both, we need to play some fancy
- * MPI games to get the communicators working correctly. If we're executing as both
- * a client and a server, we split the communicator so that the client thinks its
- * running by itself.
- */
- int color = 0; // color=0-->server, color=1-->client
- if (args.client_flag && args.server_flag) {
- if (np < 2) {
- log_error(debug_level, "Must use at least 2 MPI processes for client and server mode");
- MPI_Abort(MPI_COMM_WORLD, -1);
- }
-
- // Split the communicators. Put all the servers as the first ranks.
- if (rank < args.num_servers) {
- color = 0;
- log_debug(debug_level, "rank=%d is a server", rank);
- }
- else {
- color = 1; // all others are clients
- log_debug(debug_level, "rank=%d is a client", rank);
- }
-
- MPI_Comm_split(MPI_COMM_WORLD, color, rank, &comm);
- }
- else {
- if (args.client_flag) {
- color=1;
- log_debug(debug_level, "rank=%d is a client", rank);
- }
- else if (args.server_flag) {
- color=0;
- log_debug(debug_level, "rank=%d is a server", rank);
- }
- else {
- log_error(debug_level, "Must be either a client or a server");
- MPI_Abort(MPI_COMM_WORLD, -1);
- }
- MPI_Comm_split(MPI_COMM_WORLD, color, rank, &comm);
- }
-
- MPI_Comm_rank(comm, &splitrank);
- MPI_Comm_size(comm, &splitsize);
-
- log_debug(debug_level, "%d: Finished splitting communicators", rank);
-
- /**
- * Initialize the Nessie interface by specifying a transport, encoding scheme, and a
- * recommended URL. \ref NSSI_DEFAULT_TRANSPORT is usually the best choice, since it
- * is often the case that only one type of transport exists on a particular platform.
- * Currently supported transports are \ref NSSI_RPC_PTL, \ref NSSI_RPC_GNI, and
- * \ref NSSI_RPC_IB. We only support one type of encoding scheme so NSSI_DEFAULT_ENCODE
- * should always be used for the second argument. The URL can be specified (as we did for
- * the server, or NULL (as we did for the client). This is a recommended value. Use the
- * \ref nssi_get_url function to find the actual value.
- */
- nssi_rpc_init((nssi_rpc_transport)args.transport, NSSI_DEFAULT_ENCODE, NULL);
-
- // Get the Server URL
- std::string my_url(NSSI_URL_LEN, '\0');
- nssi_get_url((nssi_rpc_transport)args.transport, &my_url[0], NSSI_URL_LEN);
-
- // If running as both client and server, gather and distribute
- // the server URLs to all the clients.
- if (args.server_flag && args.client_flag) {
-
- std::string all_urls;
-
- // This needs to be a vector of chars, not a string
- all_urls.resize(args.num_servers * NSSI_URL_LEN, '\0');
-
- // Have servers gather their URLs
- if (color == 0) {
- assert(args.num_servers == splitsize); // these should be equal
-
- log_debug(debug_level, "%d: Gathering urls: my_url=%s", rank, my_url.c_str());
-
- // gather all urls to rank 0 of the server comm (also rank 0 of MPI_COMM_WORLD)
- MPI_Gather(&my_url[0], NSSI_URL_LEN, MPI_CHAR,
- &all_urls[0], NSSI_URL_LEN, MPI_CHAR, 0, comm);
- }
-
- // broadcast the full set of server urls to all processes
- MPI_Bcast(&all_urls[0], all_urls.size(), MPI_CHAR, 0, MPI_COMM_WORLD);
-
- log_debug(debug_level, "%d: Bcast urls, urls.size=%d", rank, all_urls.size());
-
- if (color == 1) {
-
- // For block distribution scheme use the utility function (in xfer_util.cpp)
- if (args.block_distribution) {
- // Use this utility function to calculate the server_index
- xfer_block_partition(args.num_servers, splitsize, splitrank, &server_index, &rank_in_server);
- }
-
- // Use a simple round robin distribution scheme
- else {
- server_index = splitrank % args.num_servers;
- rank_in_server = splitrank / args.num_servers;
- }
-
- // Copy the server url out of the list of urls
- int offset = server_index * NSSI_URL_LEN;
-
- args.server_url = all_urls.substr(offset, NSSI_URL_LEN);
-
- log_debug(debug_level, "client %d assigned to server \"%s\"", splitrank, args.server_url.c_str());
- }
-
-
- log_debug(debug_level, "%d: Finished distributing server urls, server_url=%s", rank, args.server_url.c_str());
- }
-
- // If running as a client only, have to get the list of servers from the urlfile.
- else if (!args.server_flag && args.client_flag){
-
- sleep(args.delay); // give server time to get started
-
- std::vector< std::string > urlbuf;
- xfer_read_server_url_file(args.url_file.c_str(), urlbuf, comm);
- args.num_servers = urlbuf.size();
-
- // For block distribution scheme use the utility function (in xfer_util.cpp)
- if (args.block_distribution) {
- // Use this utility function to calculate the server_index
- xfer_block_partition(args.num_servers, splitsize, splitrank, &server_index, &rank_in_server);
- }
-
- // Use a simple round robin distribution scheme
- else {
- server_index = splitrank % args.num_servers;
- rank_in_server = splitrank / args.num_servers;
- }
-
- args.server_url = urlbuf[server_index];
- log_debug(debug_level, "client %d assigned to server \"%s\"", splitrank, args.server_url.c_str());
- }
-
- else if (args.server_flag && !args.client_flag) {
- args.server_url = my_url;
-
- if (args.url_file.empty()) {
- log_error(debug_level, "Must set --url-file");
- MPI_Abort(MPI_COMM_WORLD, -1);
- }
-
- xfer_write_server_url_file(args.url_file.c_str(), my_url.c_str(), comm);
- }
-
- // Set the debug level for the xfer service.
- xfer_debug_level = args.debug_level;
-
- // Print the arguments after they've all been set.
- log_debug(debug_level, "%d: server_url=%s", rank, args.server_url.c_str());
-
- print_args(out, args, "%");
-
- log_debug(debug_level, "server_url=%s", args.server_url.c_str());
-
- //------------------------------------------------------------------------------
- /** If we're running this job with a server, the server always executes on node 0.
- * In this example, the server is a single process.
- */
- if (color == 0) {
- rc = xfer_server_main((nssi_rpc_transport)args.transport, args.num_threads, comm);
- log_debug(debug_level, "Server is finished");
- }
-
- // ------------------------------------------------------------------------------
- /** The parallel client will execute this branch. The root node, node 0, of the client connects
- * connects with the server, using the \ref nssi_get_service function. Then the root
- * broadcasts the service description to the other clients before starting the main
- * loop of the client code by calling \ref xfer_client_main.
- */
- else {
- int i;
- int client_rank;
-
- // get rank within the client communicator
- MPI_Comm_rank(comm, &client_rank);
-
- nssi_init((nssi_rpc_transport)args.transport);
-
- // Only one process needs to connect to the service
- // TODO: Make get_service a collective call (some transports do not need a connection)
- //if (client_rank == 0) {
- {
-
-
- // connect to remote server
- for (i=0; i < args.num_retries; i++) {
- log_debug(debug_level, "Try to connect to server: attempt #%d, url=%s", i, args.server_url.c_str());
- rc=nssi_get_service((nssi_rpc_transport)args.transport, args.server_url.c_str(), args.timeout, &xfer_svc);
- if (rc == NSSI_OK)
- break;
- else if (rc != NSSI_ETIMEDOUT) {
- log_error(xfer_debug_level, "could not get svc description: %s",
- nssi_err_str(rc));
- break;
- }
- }
- }
-
- // wait for all the clients to connect
- MPI_Barrier(comm);
-
- //MPI_Bcast(&rc, 1, MPI_INT, 0, comm);
-
- if (rc == NSSI_OK) {
- if (client_rank == 0) log_debug(debug_level, "Connected to service on attempt %d\n", i);
-
- // Broadcast the service description to the other clients
- //log_debug(xfer_debug_level, "Bcasting svc to other clients");
- //MPI_Bcast(&xfer_svc, sizeof(nssi_service), MPI_BYTE, 0, comm);
-
- log_debug(debug_level, "Starting client main");
- // Start the client code
- xfer_client_main(args, xfer_svc, comm);
-
-
- MPI_Barrier(comm);
-
- // Tell one of the clients to kill the server
- if ((args.kill_server_flag) && (rank_in_server == 0)) {
- log_debug(debug_level, "%d: Halting xfer service", rank);
- rc = nssi_kill(&xfer_svc, 0, 5000);
- }
- rc=nssi_free_service((nssi_rpc_transport)args.transport, &xfer_svc);
- if (rc != NSSI_OK) {
- log_error(xfer_debug_level, "could not free svc description: %s",
- nssi_err_str(rc));
- }
- }
-
- else {
- if (client_rank == 0)
- log_error(debug_level, "Failed to connect to service after %d attempts: ABORTING", i);
- success = false;
- //MPI_Abort(MPI_COMM_WORLD, -1);
- }
-
- nssi_fini((nssi_rpc_transport)args.transport);
-
- }
-
- log_debug(debug_level, "%d: clean up nssi", rank);
- MPI_Barrier(MPI_COMM_WORLD);
-
- // Clean up nssi_rpc
- rc = nssi_rpc_fini((nssi_rpc_transport)args.transport);
- if (rc != NSSI_OK)
- log_error(debug_level, "Error in nssi_rpc_fini");
-
- log_debug(debug_level, "%d: MPI_Finalize()", rank);
- MPI_Finalize();
-
- logger_fini();
-
- if(success && (rc == NSSI_OK))
- out << "\nEnd Result: TEST PASSED" << std::endl;
- else
- out << "\nEnd Result: TEST FAILED" << std::endl;
-
- return ((success && (rc==NSSI_OK)) ? 0 : 1 );
-}
diff --git a/packages/trios/examples/xfer-service/xfer_threads.cpp b/packages/trios/examples/xfer-service/xfer_threads.cpp
deleted file mode 100644
index 2f981a42f357..000000000000
--- a/packages/trios/examples/xfer-service/xfer_threads.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*
- * xfer_threads.cpp
- *
- * Created on: Aug 20, 2012
- * Author: raoldfi
- */
-
-#include "Trios_nssi_server.h"
-#include "Trios_logger.h"
-
-#include
-#include
-
-#include "xfer_debug.h"
-#include "xfer_threads.h"
-
-
-
-std::queue pending_reqs;
-pthread_cond_t pending_not_empty;
-pthread_cond_t pending_not_full;
-pthread_mutex_t pending_mutex;
-
-static volatile bool time_to_exit=false;
-
-static uint32_t max_num_reqs;
-static std::queue consumer_threads;
-
-/** This is the consumer thread code.
- * It pops requests off the pending queue and calls the
- * process_rpc_request function.
- */
-void *process_pending_reqs(void *arg)
-{
- int rc;
- nssi_svc_rpc_request *req = NULL;
- log_level debug_level = xfer_debug_level;
-
- intptr_t id = (intptr_t)arg;
-
- log_info(debug_level, "%d: starting thread", id);
-
- // do this outside the loop to prevent tons of calls
- pthread_mutex_lock(&pending_mutex);
-
- while (!time_to_exit) {
-
- if (!pending_reqs.empty()) {
- // pull the next request off the queue
- req = pending_reqs.front();
- pending_reqs.pop();
-
- // signal the producer thread that the the queue is not "full"
- pthread_cond_signal(&pending_not_full);
-
- // unlock the mutex while we process the request
- pthread_mutex_unlock(&pending_mutex);
-
- log_debug(debug_level, "%d: processing request %d", id, req->id);
-
- rc = nssi_process_rpc_request(req);
- if (rc) {
- log_error(xfer_debug_level, "%d: Error processing request", id);
- return NULL;
- }
- pthread_mutex_lock(&pending_mutex);
- }
- else {
- // block this thread until the producer thread signals that the queue is not "empty"
- pthread_cond_wait(&pending_not_empty, &pending_mutex);
- }
- }
-
- pthread_mutex_unlock(&pending_mutex);
-
- log_info(debug_level, "%d: exiting process_pending_reqs thread", id);
- return NULL;
-}
-
-
-
-void xfer_start_server_threads(const int num_threads, const int max_reqs)
-{
- // initialize the condition and mutex variables for the pending queue
- pthread_cond_init(&pending_not_empty, NULL); // default attributes
- pthread_cond_init(&pending_not_full, NULL); // default attributes
- pthread_mutex_init(&pending_mutex, NULL); // default attributes
-
- max_num_reqs = max_reqs;
-
- // start the consumer threads
- for (int64_t i=0; i= max_num_reqs) {
- pthread_cond_wait(&pending_not_full, &pending_mutex);
- }
-
- log_debug(xfer_debug_level, "Adding request %d to the pending queue", req->id);
-
- // ok to add the request
- pending_reqs.push(req);
-
- // tell the consumer threads the queue has new data
- pthread_cond_signal(&pending_not_empty);
-
- pthread_mutex_unlock(&pending_mutex);
-
- return(0);
-}
-
-void xfer_cancel_server_threads()
-{
- log_debug(xfer_debug_level, "Canceling server threads");
-
- pthread_mutex_lock(&pending_mutex);
- time_to_exit = true;
- pthread_cond_broadcast(&pending_not_empty);
- pthread_mutex_unlock(&pending_mutex);
-
- while (!consumer_threads.empty()) {
- pthread_t tid = consumer_threads.front();
- consumer_threads.pop();
- pthread_join(tid, NULL);
- }
-}
-
diff --git a/packages/trios/examples/xfer-service/xfer_threads.h b/packages/trios/examples/xfer-service/xfer_threads.h
deleted file mode 100644
index b43142f474d5..000000000000
--- a/packages/trios/examples/xfer-service/xfer_threads.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*
- * xfer_threads.h
- *
- * Created on: Aug 20, 2012
- * Author: raoldfi
- */
-
-#ifndef XFER_THREADS_H_
-#define XFER_THREADS_H_
-
-#include "Trios_nssi_server.h"
-
-void xfer_start_server_threads(const int num_threads, const int max_reqs);
-int xfer_enqueue_rpc_request(nssi_svc_rpc_request *req);
-void xfer_cancel_server_threads();
-
-
-#endif /* XFER_THREADS_H_ */
diff --git a/packages/trios/examples/xfer-service/xfer_util.cpp b/packages/trios/examples/xfer-service/xfer_util.cpp
deleted file mode 100644
index 9964ec21541d..000000000000
--- a/packages/trios/examples/xfer-service/xfer_util.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*
- * xfer_util.cpp
- *
- * Created on: Nov 4, 2011
- * Author: raoldfi
- */
-
-
-#include "Trios_nssi_types_xdr.h"
-#include "xfer_service_args.h"
-#include "xfer_debug.h"
-#include "xfer_util.h"
-#include "xfer_client.h"
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-
-
-/**
- * Output the configuration file with this format
- * ------
- * line 1: ns # number of servers
- * line 2: server_url_0
- * line 3: server_url_1
- * ...
- * line n: server_url_n-1
- */
-int xfer_write_server_url_file(
- std::string url_fname,
- std::string my_url,
- MPI_Comm comm)
-{
- int rc = 0;
- int rank, np;
- log_level debug_level = LOG_UNDEFINED;
-
- MPI_Comm_rank(comm, &rank);
- MPI_Comm_size(comm, &np);
-
- // output the config file
- if (!url_fname.empty()) {
-
- // gather the urls from all the servers
- std::string urls(NSSI_URL_LEN*np, '\0');
- MPI_Gather(&my_url[0], NSSI_URL_LEN, MPI_CHAR, &urls[0], NSSI_URL_LEN, MPI_CHAR, 0, comm);
-
- // Write the urls to the config file
- if (rank == 0) {
- int i;
-
- std::string tmp_fname = url_fname + ".tmp";
- std::ofstream urlfile (tmp_fname.c_str());
- if (urlfile.is_open()) {
- // write the number of servers as the first line
- urlfile << np << std::endl;
-
- for (i=0; i &urlbuf, MPI_Comm comm)
-{
- log_level debug_level = xfer_debug_level;
- int rank, np;
- struct stat sbuf;
-
- MPI_Comm_rank(comm, &rank);
- MPI_Comm_size(comm, &np);
-
- // variables for the serverURLs
- int numServers = 0;
-
- // Open the file and get all the server urls
- if (rank == 0) {
-
- while (stat(path, &sbuf)) { log_debug(debug_level, "%s: %s", path, strerror(errno)); sleep(1); }
-
- // try to open the file
- std::ifstream urlFile(path);
- if (urlFile.is_open()) {
- if (urlFile.good()) {
- std::string line;
- std::getline(urlFile, line);
- numServers = std::atoi(line.c_str());
- }
-
- urlbuf.resize(numServers, std::string(NSSI_URL_LEN, '\0'));
-
- for (int i=0; idata_array_t_len;
- data_t *buf = array->data_array_t_val;
-
- /* initialize the random seed */
- //initstate(seed, state, 8);
-
- for (int i=0; idata_array_t_len != arr2->data_array_t_len) {
- log_error(debug_level, "arr1->len=%d, arr2->len=%d",
- arr1->data_array_t_len, arr2->data_array_t_len);
- return -1;
- }
-
- for (int i=0; i<(int)arr1->data_array_t_len; i++) {
- if (arr1->data_array_t_val[i].int_val != arr2->data_array_t_val[i].int_val) {
- log_error(debug_level, "val[%d].int_val=%d, val[%d].int_val=%d",
- i,arr1->data_array_t_val[i].int_val,
- i,arr2->data_array_t_val[i].int_val);
- return -1;
- }
- if (arr1->data_array_t_val[i].float_val != arr2->data_array_t_val[i].float_val) {
- log_error(debug_level, "val[%d].float_val=%f, val[%d].float_val=%f",
- i,arr1->data_array_t_val[i].float_val,
- i,arr2->data_array_t_val[i].float_val);
- return -1;
- }
- if (arr1->data_array_t_val[i].double_val != arr2->data_array_t_val[i].double_val) {
- log_error(debug_level, "val[%d].double_val=%g, val[%d].double_val=%g",
- i,arr1->data_array_t_val[i].double_val,
- i,arr2->data_array_t_val[i].double_val);
- return -1;
- }
- }
-
- return 0;
-
-}
-
-
-int xfer_validate_array(const int seed, data_array_t *array)
-{
- int rc = 0;
- log_level debug_level = xfer_debug_level;
-
- /* Validate the array that was sent through the args */
- data_array_t tmp_array;
-
- tmp_array.data_array_t_len = array->data_array_t_len;
- tmp_array.data_array_t_val = new data_t[array->data_array_t_len];
-
- xfer_init_data_array(seed, &tmp_array);
- rc = xfer_compare_data_arrays(&tmp_array, array);
-
- if (rc != 0) {
- log_warn(debug_level, "Unable to validate array");
- }
-
- delete [] tmp_array.data_array_t_val;
- return rc;
-}
-
-
-/**
- * Partition this val into a bin using a simple linear block-partitioning
- * scheme.
- *
- * Returns the bin assignment and the rank within that bin.
- *
- */
-int xfer_block_partition(
- const int num_bins,
- const int num_vals,
- const int val,
- int *bin,
- int *rank)
-{
-
- int per_bin = num_vals / num_bins;
- int num_large = num_vals % num_bins; // number of bins with one extra
-
- int barrier = num_large * (per_bin + 1); // total number of vals in large bins
-
- if (val < barrier) {
- *bin = val / (per_bin + 1);
- *rank = val % (per_bin + 1);
- }
-
- else {
- *bin = num_large + (val - barrier)/per_bin;
- *rank = (val - barrier) % per_bin;
- }
-
- //std::cout << "num_bins=" << num_bins << ", num_vals=" << num_vals;
- //std::cout << ": val=" << val << ", bin=" << bin << ", rank=" << rank << std::endl;
-
- return 0;
-}
diff --git a/packages/trios/examples/xfer-service/xfer_util.h b/packages/trios/examples/xfer-service/xfer_util.h
deleted file mode 100644
index e8d4cf42d6a9..000000000000
--- a/packages/trios/examples/xfer-service/xfer_util.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*
- * xfer_util.h
- *
- * Created on: May 31, 2012
- * Author: raoldfi
- */
-
-#ifndef XFER_UTIL_H_
-#define XFER_UTIL_H_
-
-#include
-#include
-#include
-
-#include "Trios_nssi_fprint_types.h"
-#include "Trios_nnti_fprint_types.h"
-
-
-#include "xfer_service_args.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int xfer_write_server_url_file(
- std::string url_fname,
- std::string my_url,
- MPI_Comm comm);
-
-
-extern void xfer_read_server_url_file(
- const char *path,
- std::vector &urlbuf,
- MPI_Comm comm);
-
-/**
- * Initialize an array given a starting seed.
- *
- * This function is used by both the client and the server to generate
- * initialize values in a buffer.
- */
-extern void xfer_init_data_array(
- const unsigned int seed,
- data_array_t *array);
-
-/**
- * Compare two arrays. If they are equal, return 0.
- */
-extern int xfer_compare_data_arrays(
- const data_array_t *arr1,
- const data_array_t *arr2);
-
-
-extern int xfer_validate_array(
- const int seed,
- data_array_t *array);
-
-extern int xfer_block_partition(
- const int num_bins,
- const int num_vals,
- const int val,
- int *bin,
- int *rank);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* XFER_UTIL_H_ */
diff --git a/packages/trios/libraries/CMakeLists.txt b/packages/trios/libraries/CMakeLists.txt
deleted file mode 100644
index 2d5f8f00540b..000000000000
--- a/packages/trios/libraries/CMakeLists.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-# @HEADER
-# ************************************************************************
-#
-# Trios: Trilinos I/O Support
-# Copyright 2011 Sandia Corporation
-#
-# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-# the U.S. Government retains certain rights in this software.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. 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.
-#
-# 3. Neither the name of the Corporation nor the names of the
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-# 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.
-#
-# Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-#
-# *************************************************************************
-# @HEADER
-
-
-# We need to make sure at least one of the optional TPLs for data transport
-# was enabled. There might be a way to do this in the Dependencies.cmake file,
-# but I couldn't figure it out.
-
-IF (NOT ${PACKAGE_NAME}_HAVE_RDMA_TRANSPORT)
- MESSAGE(WARNING "Did not find a supported network protocol. "
- "Nessie requires one of the following TPLs to be enabled: "
- " Portals, CrayPortals, InfiniBand, PAMI, DCMF, BGPDMA, Gemini")
-ENDIF()
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nessie/client)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nessie/server)
diff --git a/packages/trios/libraries/commsplitter/CMakeLists.txt b/packages/trios/libraries/commsplitter/CMakeLists.txt
deleted file mode 100644
index 0bba38b65d6e..000000000000
--- a/packages/trios/libraries/commsplitter/CMakeLists.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-
-# @HEADER
-# ************************************************************************
-#
-# Trios: Trilinos I/O Support
-# Copyright 2011 Sandia Corporation
-#
-# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-# the U.S. Government retains certain rights in this software.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. 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.
-#
-# 3. Neither the name of the Corporation nor the names of the
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-# 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.
-#
-# Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-#
-# *************************************************************************
-# @HEADER
-
-
-
-TRIBITS_SUBPACKAGE(commsplitter)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=200112L")
-
-SET(HEADERS "")
-SET(NONINSTALLHEADERS "")
-SET(SOURCES "")
-
-APPEND_SET(NOINSTALLHEADERS
- commsplitter.h
-)
-
-APPEND_SET(SOURCES
- init.c
- logging.c
- wrappers.c
-)
-
-############# libcommsplitter ##########################
-
-TRIBITS_ADD_LIBRARY(
- commsplitter
- HEADERS ${HEADERS}
- NOINSTALLHEADERS ${NOINSTALLHEADERS}
- SOURCES ${SOURCES}
- DEPLIBS ${DEPLIBS} -lz
-)
-
-TRIBITS_SUBPACKAGE_POSTPROCESS()
diff --git a/packages/trios/libraries/commsplitter/Makefile b/packages/trios/libraries/commsplitter/Makefile
deleted file mode 100644
index 10d07a162cc8..000000000000
--- a/packages/trios/libraries/commsplitter/Makefile
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-#@HEADER
-# ************************************************************************
-#
-# Trios: Trilinos I/O Support
-# Copyright 2011 Sandia Corporation
-#
-# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-# the U.S. Government retains certain rights in this software.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. 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.
-#
-# 3. Neither the name of the Corporation nor the names of the
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-# 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.
-#
-#Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-#
-# *************************************************************************
-#@HEADER
-
-#CC = cc
-#FC = ftn
-CC = mpicc
-FC = mpif90
-AR = ar
-RM = rm -f
-CFLAGS = -O2
-OBJS = init.o logging.o wrappers.o
-LIB = libcommsplitter.a
-TEST = ctest.exe ftest.exe
-
-CFLAGS = -O0 -g
-
-all: $(LIB) $(TEST)
-
-$(LIB): $(OBJS)
- $(AR) rcs $(LIB) $(OBJS)
-
-test: $(TEST)
- @echo "******************************************************************"
- @echo "Each app should report that it belongs to a communicator of size 2"
- @echo "******************************************************************"
- mpirun -n 2 ./ctest.exe : -n 2 ./ftest.exe
-
-debug: all
-
-$(TEST): $(OBJS) ftest.f90 ctest.c
- $(FC) -g ftest.f90 -o ftest.exe -L. -lcommsplitter -lz
- $(CC) -g ctest.c -o ctest.exe -L. -lcommsplitter -lz
-
-.c.o:
- $(CC) $(CFLAGS) -c -o $@ $<
-
-clean:
- $(RM) $(OBJS) $(LIB) $(TEST) *~
diff --git a/packages/trios/libraries/commsplitter/cmake/Dependencies.cmake b/packages/trios/libraries/commsplitter/cmake/Dependencies.cmake
deleted file mode 100644
index 5b90a9283f80..000000000000
--- a/packages/trios/libraries/commsplitter/cmake/Dependencies.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-SET(LIB_REQUIRED_DEP_PACKAGES)
-SET(LIB_OPTIONAL_DEP_PACKAGES)
-SET(TEST_REQUIRED_DEP_PACKAGES)
-SET(TEST_OPTIONAL_DEP_PACKAGES)
-SET(LIB_REQUIRED_DEP_TPLS MPI)
-SET(LIB_OPTIONAL_DEP_TPLS HPCToolkit)
-SET(TEST_REQUIRED_DEP_TPLS)
-SET(TEST_OPTIONAL_DEP_TPLS)
diff --git a/packages/trios/libraries/commsplitter/commsplitter.h b/packages/trios/libraries/commsplitter/commsplitter.h
deleted file mode 100644
index 0ae1112870fb..000000000000
--- a/packages/trios/libraries/commsplitter/commsplitter.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-typedef struct commsplitter_t {
- char *app_pathname;
- int debug_level;
-
- int gsize;
- int grank;
-
- /* pcontrol - default is yes*/
- int enabled;
-
- MPI_Comm split_comm;
-} commsplitter_t;
-
-
-extern commsplitter_t commsplitter_data;
-
-
-void commsplitter_log(char *fmt, ...);
diff --git a/packages/trios/libraries/commsplitter/ctest.c b/packages/trios/libraries/commsplitter/ctest.c
deleted file mode 100644
index 75f34f53ccd0..000000000000
--- a/packages/trios/libraries/commsplitter/ctest.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-#include
-#include
-#include
-
-int main(int argc, char **argv)
-{
- int np;
- int rank;
- char buf[256];
-
- MPI_Init(&argc, &argv);
- MPI_Comm_size(MPI_COMM_WORLD, &np);
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- gethostname(buf, 256);
- printf("ctest: rank %d of %d executing on %s\n", rank, np, buf);
- MPI_Finalize();
-
- return(0);
-}
diff --git a/packages/trios/libraries/commsplitter/ftest.f90 b/packages/trios/libraries/commsplitter/ftest.f90
deleted file mode 100644
index 38ae8870be08..000000000000
--- a/packages/trios/libraries/commsplitter/ftest.f90
+++ /dev/null
@@ -1,60 +0,0 @@
-!**
-!/@HEADER
-!/ ************************************************************************
-!/
-!/ Trios: Trilinos I/O Support
-!/ Copyright 2011 Sandia Corporation
-!/
-!/ Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-!/ the U.S. Government retains certain rights in this software.
-!/
-!/ Redistribution and use in source and binary forms, with or without
-!/ modification, are permitted provided that the following conditions are
-!/ met:
-!/
-!/ 1. Redistributions of source code must retain the above copyright
-!/ notice, this list of conditions and the following disclaimer.
-!/
-!/ 2. 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.
-!/
-!/ 3. Neither the name of the Corporation nor the names of the
-!/ contributors may be used to endorse or promote products derived from
-!/ this software without specific prior written permission.
-!/
-!/ THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-!/ 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.
-!/
-!/Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-!/
-!/ *************************************************************************
-!/@HEADER
-!*/
- PROGRAM commsplitter_test
-
- INCLUDE 'mpif.h'
-
- INTEGER info
- INTEGER np
- INTEGER rank
- CHARACTER*(1024) hostname
- INTEGER hostname_len
-
- CALL MPI_Init(info)
- CALL MPI_Comm_size(mpi_comm_world,np,info)
- CALL MPI_Comm_rank(mpi_comm_world,rank,info)
- CALL MPI_Get_processor_name(hostname, hostname_len, info);
- PRINT *,'ftest: rank ',rank,' of ',np,' executing on ', trim(hostname)
- CALL MPI_Finalize(info)
-
- end
diff --git a/packages/trios/libraries/commsplitter/init.c b/packages/trios/libraries/commsplitter/init.c
deleted file mode 100644
index b365e3b888e9..000000000000
--- a/packages/trios/libraries/commsplitter/init.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-#include
-#include
-#include
-#include
-
-#include
-
-#include "commsplitter.h"
-
-
-
-commsplitter_t commsplitter_data;
-
-
-void commsplitter_getenv(void)
-{
- char *envstr=getenv("COMMSPLITTER_DEBUG_LEVEL");
- if (envstr != NULL) {
- commsplitter_data.debug_level=atoi(envstr);
- }
-}
-
-void commsplitter_init(char *app_name)
-{
- int hostname_len;
- char hostname[MPI_MAX_PROCESSOR_NAME];
-
- commsplitter_data.enabled = 1;
- commsplitter_data.debug_level = 0;
- commsplitter_data.split_comm = MPI_COMM_NULL;
-
- PMPI_Comm_rank(MPI_COMM_WORLD, &commsplitter_data.grank);
- PMPI_Comm_size(MPI_COMM_WORLD, &commsplitter_data.gsize);
- PMPI_Get_processor_name(hostname, &hostname_len);
-
- commsplitter_getenv();
-
- if (commsplitter_data.grank == 0) {
- commsplitter_log("\n");
- commsplitter_log("commsplitter initialized\n");
- commsplitter_log("\n");
- }
-
- commsplitter_log("app_name is %s\n", app_name);
- commsplitter_log("successful init of grank=%d on %s\n", commsplitter_data.grank, hostname);
-
- return;
-}
-
-void commsplitter_fini(void)
-{
- return;
-}
diff --git a/packages/trios/libraries/commsplitter/logging.c b/packages/trios/libraries/commsplitter/logging.c
deleted file mode 100644
index 16ff067f5b43..000000000000
--- a/packages/trios/libraries/commsplitter/logging.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-#include
-#include
-
-#include
-
-#include "commsplitter.h"
-
-
-void commsplitter_log(char *fmt, ...)
-{
- va_list args;
- FILE *fp = stdout;
-
- if (commsplitter_data.debug_level <= 0) {
- return;
- }
-
- va_start (args, fmt);
- fprintf (fp, "COMMSPLITTER (grank=%d): ", commsplitter_data.grank);
- vfprintf (fp, fmt, args);
- va_end (args);
- fflush (fp);
-}
diff --git a/packages/trios/libraries/commsplitter/wrappers.c b/packages/trios/libraries/commsplitter/wrappers.c
deleted file mode 100644
index 82200ccd8e16..000000000000
--- a/packages/trios/libraries/commsplitter/wrappers.c
+++ /dev/null
@@ -1,5054 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-#include "Trios_config.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-#include
-
-#include "commsplitter.h"
-
-void commsplitter_init(char *app_name);
-void commsplitter_fini(void);
-
-
-#ifdef HAVE_TRIOS_HPCTOOLKIT
-#include
-#define SAMPLING_IS_ACTIVE() hpctoolkit_sampling_is_active()
-#define SAMPLING_STOP() hpctoolkit_sampling_stop()
-#define SAMPLING_START() hpctoolkit_sampling_start()
-#else
-#define SAMPLING_IS_ACTIVE() 0
-#define SAMPLING_STOP()
-#define SAMPLING_START()
-#endif
-
-
-#define COMMSPLITTER_PATH_MAX 1024
-
-
-#define SUBSTITUTE_COMM \
-{\
- orig_comm = *comm;\
- MPI_Comm_compare(*comm, MPI_COMM_WORLD, &compare_result);\
- if (compare_result == MPI_IDENT) {\
- *comm = commsplitter_data.split_comm;\
- }\
-}
-
-#define RESTORE_COMM \
-{\
- *comm = orig_comm;\
-}
-
-
-
-
-static char *get_exe_name(char *pathname)
-{
- char *slash;
-
- slash=rindex(pathname, '/')+1;
-
- return(slash);
-}
-
-static char *get_app_pathname_from_proc(void)
-{
- int exelen, bufsize=COMMSPLITTER_PATH_MAX;
- char *buf = NULL;
-
- buf = malloc(bufsize);
- if (buf == NULL) {
- commsplitter_log("unable to allocate space for full executable path.\n");
- PMPI_Abort(MPI_COMM_WORLD, -1);
- }
-
- exelen = readlink("/proc/self/exe", buf, COMMSPLITTER_PATH_MAX);
- if (exelen == -1) {
- free(buf);
- } else {
- buf[exelen] = '\0';
- return(buf);
- }
-
- return NULL;
-}
-
-static void get_app_args_from_proc(int *argc, char **argv, int max_args)
-{
- int i=0;
- char *buf;
- FILE *f;
- char *arg;
-
- *argc = 0;
- *argv = NULL;
-
- buf = malloc(COMMSPLITTER_PATH_MAX);
- f = fopen("/proc/self/cmdline", "r");
- if (f != NULL) {
- if (fread(buf, 1, COMMSPLITTER_PATH_MAX, f) > 0) {
- arg = buf;
- while(*arg != '\0') {
- argv[i] = (char *)malloc(strlen(arg));
- strcpy(argv[i], arg);
- arg += strlen(argv[i]) + 1;
- i++;
- if (i==max_args) {
- commsplitter_log("ERROR: too many args. truncating.");
- break;
- }
- }
- }
- *argc = i;
- }
-
- free(buf);
- fclose(f);
-}
-
-static int split_comm_world(void)
-{
- int rc = 0;
- int enabled_save;
- uint32_t color=0;
-
- if(commsplitter_data.app_pathname == NULL) {
- commsplitter_log("Unable to determine application's full pathname. Cannot split MPI_COMM_WORLD.\n");
- PMPI_Abort(MPI_COMM_WORLD, -1);
- } else {
- color = crc32(0L, Z_NULL, 0);
- color = crc32(color, (Bytef *)commsplitter_data.app_pathname, strlen(commsplitter_data.app_pathname));
- commsplitter_log("crc32 for app_pathname(%s) is %lu\n", commsplitter_data.app_pathname, color);
- }
-
- enabled_save = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
- rc=PMPI_Comm_split(MPI_COMM_WORLD, color, commsplitter_data.grank, &commsplitter_data.split_comm);
- commsplitter_data.enabled = enabled_save;
-
- return(rc);
-}
-
-
-static int commsplitter_MPI_Init(int *argc, char ***argv)
-{
- int rc = 0;
- int enabled_save;
-
- enabled_save = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- /* stop hpctoolkit sampling (sometimes causes faults) */
- int sampling = SAMPLING_IS_ACTIVE();
- if (sampling) SAMPLING_STOP();
-
- rc = PMPI_Init(argc, argv);
-
- commsplitter_data.enabled = enabled_save;
-
- commsplitter_data.app_pathname = get_app_pathname_from_proc();
- commsplitter_init(get_exe_name(commsplitter_data.app_pathname));
- commsplitter_log("app_pathname is %s\n", commsplitter_data.app_pathname);
-
- rc=split_comm_world();
-
- if (sampling) SAMPLING_START();
-
- return(rc);
-}
-
-extern int MPI_Init(int *argc, char ***argv)
-{
- int rc = 0;
-
- rc = commsplitter_MPI_Init(argc, argv);
-
- return(rc);
-}
-
-extern void mpi_init_(int *ierr)
-{
- int rc = 0;
- int argc;
- char **argv;
-
- argv=(char **)malloc(256*sizeof(char*));
- get_app_args_from_proc(&argc, argv, 256);
-
- rc = commsplitter_MPI_Init(&argc,(char ***) &argv);
- *ierr = rc;
-
- return;
-}
-
-
-static int commsplitter_MPI_Init_thread(int *argc, char ***argv, int required, int *provided)
-{
- int rc = 0;
- int enabled_save;
-
- enabled_save = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- int sampling = SAMPLING_IS_ACTIVE();
- if (sampling) SAMPLING_STOP();
- rc = PMPI_Init_thread(argc, argv, required, provided);
-
- commsplitter_data.enabled = enabled_save;
-
- commsplitter_data.app_pathname = get_app_pathname_from_proc();
- commsplitter_init(get_exe_name(commsplitter_data.app_pathname));
- commsplitter_log("app_pathname is %s\n", commsplitter_data.app_pathname);
-
- rc=split_comm_world();
- if (sampling) SAMPLING_START();
-
- return(rc);
-}
-
-extern int MPI_Init_thread(int *argc, char ***argv, int required, int *provided)
-{
- int rc = 0;
-
- rc = commsplitter_MPI_Init_thread(argc, argv, required, provided);
-
- return(rc);
-}
-
-extern void mpi_init_thread_(int *required, int *provided, int *ierr)
-{
- int rc = 0;
- int argc;
- char **argv;
-
- argv=(char **)malloc(256*sizeof(char*));
- get_app_args_from_proc(&argc, argv, 256);
-
- rc = commsplitter_MPI_Init_thread(&argc, (char ***) &argv, *required, provided);
- *ierr = rc;
-
- return;
-}
-
-
-static int commsplitter_MPI_Finalize()
-{
- int rc = 0;
-
- commsplitter_fini();
- commsplitter_data.enabled = 0;
- commsplitter_log("calling PMPI_Finalize\n");
-
- int sampling = SAMPLING_IS_ACTIVE();
- if (sampling) SAMPLING_STOP();
- rc = PMPI_Finalize();
- if (sampling) SAMPLING_START();
- commsplitter_log("returning from PMPI_Finalize\n");
-
- return(rc);
-}
-
-extern int MPI_Finalize(void)
-{
- int rc = 0;
-
- rc = commsplitter_MPI_Finalize();
-
- return(rc);
-}
-
-extern void mpi_finalize_(int *ierr)
-{
- int rc = 0;
-
- rc = commsplitter_MPI_Finalize();
- *ierr = rc;
-
- return;
-}
-
-static int commsplitter_MPI_Pcontrol(
- const int flag,
- va_list args)
-{
- commsplitter_log("MPI_Pcontrol enter: flag=%d\n", flag);
-
- if (flag == 0) {
- if (!commsplitter_data.enabled) {
- commsplitter_log("WARN: commsplitter already disabled\n");
- }
- commsplitter_data.enabled = 0;
- } else {
- if (commsplitter_data.enabled) {
- commsplitter_log("WARN: commsplitter already enabled\n");
- }
- commsplitter_data.enabled = 1;
- }
-
- return MPI_SUCCESS;
-}
-
-int MPI_Pcontrol(
- const int flag,
- ...)
-{
- int rc=0;
- va_list args;
-
- va_start(args, flag);
- rc = commsplitter_MPI_Pcontrol(flag, args);
- va_end(args);
-
- return(rc);
-}
-
-int mpi_pcontrol_(
- int *flag,
- ...)
-{
- int rc=0;
- va_list args;
-
- va_start(args, flag);
- rc = commsplitter_MPI_Pcontrol(*flag, args);
- va_end(args);
-
- return(rc);
-}
-
-
-
-
-static int commsplitter_MPI_Allgather(
- void *sendbuf,
- int *sendcount,
- MPI_Datatype *sendtype,
- void *recvbuf,
- int *recvcount,
- MPI_Datatype *recvtype,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Allgather(sendbuf, *sendcount, *sendtype, recvbuf, *recvcount, *recvtype, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Allgather(
- void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcount,
- MPI_Datatype recvtype,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Allgather(sendbuf, &sendcount, &sendtype, recvbuf, &recvcount, &recvtype, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_allgather_(
- void *sendbuf,
- int *sendcount,
- MPI_Fint *sendtype,
- void *recvbuf,
- int *recvcount,
- MPI_Fint *recvtype,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Allgather(sendbuf, sendcount, &c_sendtype, recvbuf, recvcount, &c_recvtype, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Allgatherv(
- void *sendbuf,
- int *sendcount,
- MPI_Datatype *sendtype,
- void *recvbuf,
- int *recvcounts,
- int *displs,
- MPI_Datatype *recvtype,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Allgatherv(sendbuf, *sendcount, *sendtype, recvbuf, recvcounts, displs, *recvtype, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Allgatherv(
- void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- void *recvbuf,
- int *recvcounts,
- int *displs,
- MPI_Datatype recvtype,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Allgatherv(sendbuf, &sendcount, &sendtype, recvbuf, recvcounts, displs, &recvtype, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_allgatherv_(
- void *sendbuf,
- int *sendcount,
- MPI_Fint *sendtype,
- void *recvbuf,
- int *recvcounts,
- int *displs,
- MPI_Fint *recvtype,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Allgatherv(sendbuf, sendcount, &c_sendtype, recvbuf, recvcounts, displs, &c_recvtype, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Allreduce(
- void *sendbuf,
- void *recvbuf,
- int *count,
- MPI_Datatype *datatype,
- MPI_Op *op,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Allreduce(sendbuf, recvbuf, *count, *datatype, *op, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Allreduce(
- void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Allreduce(sendbuf, recvbuf, &count, &datatype, &op, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_allreduce_(
- void *sendbuf,
- void *recvbuf,
- int *count,
- MPI_Fint *datatype,
- MPI_Fint *op,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Op c_op;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_op = MPI_Op_f2c(*op);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Allreduce(sendbuf, recvbuf, count, &c_datatype, &c_op, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Alltoall(
- void *sendbuf,
- int *sendcount,
- MPI_Datatype *sendtype,
- void *recvbuf,
- int *recvcnt,
- MPI_Datatype *recvtype,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Alltoall(sendbuf, *sendcount, *sendtype, recvbuf, *recvcnt, *recvtype, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Alltoall(
- void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcnt,
- MPI_Datatype recvtype,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Alltoall(sendbuf, &sendcount, &sendtype, recvbuf, &recvcnt, &recvtype, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_alltoall_(
- void *sendbuf,
- int *sendcount,
- MPI_Fint *sendtype,
- void *recvbuf,
- int *recvcnt,
- MPI_Fint *recvtype,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Alltoall(sendbuf, sendcount, &c_sendtype, recvbuf, recvcnt, &c_recvtype, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Alltoallv(
- void *sendbuf,
- int *sendcnts,
- int *sdispls,
- MPI_Datatype *sendtype,
- void *recvbuf,
- int *recvcnts,
- int *rdispls,
- MPI_Datatype *recvtype,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Alltoallv(sendbuf, sendcnts, sdispls, *sendtype, recvbuf, recvcnts, rdispls, *recvtype, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Alltoallv(
- void *sendbuf,
- int *sendcnts,
- int *sdispls,
- MPI_Datatype sendtype,
- void *recvbuf,
- int *recvcnts,
- int *rdispls,
- MPI_Datatype recvtype,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Alltoallv(sendbuf, sendcnts, sdispls, &sendtype, recvbuf, recvcnts, rdispls, &recvtype, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_alltoallv_(
- void *sendbuf,
- int *sendcnts,
- int *sdispls,
- MPI_Fint *sendtype,
- void *recvbuf,
- int *recvcnts,
- int *rdispls,
- MPI_Fint *recvtype,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Alltoallv(sendbuf, sendcnts, sdispls, &c_sendtype, recvbuf, recvcnts, rdispls, &c_recvtype, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Attr_delete(
- MPI_Comm *comm,
- int *keyval)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Attr_delete(*comm, *keyval);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Attr_delete(
- MPI_Comm comm,
- int keyval)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Attr_delete(&comm, &keyval);
-
- return(rc);
-}
-
-
-extern void mpi_attr_delete_(
- MPI_Fint *comm,
- int *keyval,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Attr_delete(&c_comm, keyval);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Attr_get(
- MPI_Comm *comm,
- int *keyval,
- void *attr_value,
- int *flag)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Attr_get(*comm, *keyval, attr_value, flag);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Attr_get(
- MPI_Comm comm,
- int keyval,
- void *attr_value,
- int *flag)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Attr_get(&comm, &keyval, attr_value, flag);
-
- return(rc);
-}
-
-
-extern void mpi_attr_get_(
- MPI_Fint *comm,
- int *keyval,
- void *attr_value,
- int *flag,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Attr_get(&c_comm, keyval, attr_value, flag);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Attr_put(
- MPI_Comm *comm,
- int *keyval,
- void *attr_value)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Attr_put(*comm, *keyval, attr_value);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Attr_put(
- MPI_Comm comm,
- int keyval,
- void *attr_value)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Attr_put(&comm, &keyval, attr_value);
-
- return(rc);
-}
-
-
-extern void mpi_attr_put_(
- MPI_Fint *comm,
- int *keyval,
- void *attr_value,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Attr_put(&c_comm, keyval, attr_value);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Barrier(
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Barrier(*comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Barrier(
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Barrier(&comm);
-
- return(rc);
-}
-
-
-extern void mpi_barrier_(
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Barrier(&c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Bcast(
- void *buffer,
- int *count,
- MPI_Datatype *datatype,
- int *root,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Bcast(buffer, *count, *datatype, *root, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Bcast(
- void *buffer,
- int count,
- MPI_Datatype datatype,
- int root,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Bcast(buffer, &count, &datatype, &root, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_bcast_(
- void *buffer,
- int *count,
- MPI_Fint *datatype,
- int *root,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Bcast(buffer, count, &c_datatype, root, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Bsend(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Bsend(buf, *count, *datatype, *dest, *tag, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Bsend(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Bsend(buf, &count, &datatype, &dest, &tag, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_bsend_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Bsend(buf, count, &c_datatype, dest, tag, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Bsend_init(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Bsend_init(buf, *count, *datatype, *dest, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Bsend_init(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Bsend_init(buf, &count, &datatype, &dest, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_bsend_init_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Bsend_init(buf, count, &c_datatype, dest, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Cart_coords(
- MPI_Comm *comm,
- int *rank,
- int *maxdims,
- int *coords)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Cart_coords(*comm, *rank, *maxdims, coords);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Cart_coords(
- MPI_Comm comm,
- int rank,
- int maxdims,
- int *coords)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Cart_coords(&comm, &rank, &maxdims, coords);
-
- return(rc);
-}
-
-
-extern void mpi_cart_coords_(
- MPI_Fint *comm,
- int *rank,
- int *maxdims,
- int *coords,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Cart_coords(&c_comm, rank, maxdims, coords);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Cart_create(
- MPI_Comm *comm,
- int *ndims,
- int *dims,
- int *periods,
- int *reorder,
- MPI_Comm *comm_cart)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Cart_create(*comm, *ndims, dims, periods, *reorder, comm_cart);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Cart_create(
- MPI_Comm comm,
- int ndims,
- int *dims,
- int *periods,
- int reorder,
- MPI_Comm *comm_cart)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Cart_create(&comm, &ndims, dims, periods, &reorder, comm_cart);
-
- return(rc);
-}
-
-
-extern void mpi_cart_create_(
- MPI_Fint *comm,
- int *ndims,
- int *dims,
- int *periods,
- int *reorder,
- MPI_Fint *comm_cart,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Comm c_comm_cart;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Cart_create(&c_comm, ndims, dims, periods, reorder, &c_comm_cart);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *comm_cart = MPI_Comm_c2f(c_comm_cart);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Cart_get(
- MPI_Comm *comm,
- int *maxdims,
- int *dims,
- int *periods,
- int *coords)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Cart_get(*comm, *maxdims, dims, periods, coords);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Cart_get(
- MPI_Comm comm,
- int maxdims,
- int *dims,
- int *periods,
- int *coords)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Cart_get(&comm, &maxdims, dims, periods, coords);
-
- return(rc);
-}
-
-
-extern void mpi_cart_get_(
- MPI_Fint *comm,
- int *maxdims,
- int *dims,
- int *periods,
- int *coords,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Cart_get(&c_comm, maxdims, dims, periods, coords);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Cart_map(
- MPI_Comm *comm,
- int *ndims,
- int *dims,
- int *periods,
- int *newrank)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Cart_map(*comm, *ndims, dims, periods, newrank);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Cart_map(
- MPI_Comm comm,
- int ndims,
- int *dims,
- int *periods,
- int *newrank)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Cart_map(&comm, &ndims, dims, periods, newrank);
-
- return(rc);
-}
-
-
-extern void mpi_cart_map_(
- MPI_Fint *comm,
- int *ndims,
- int *dims,
- int *periods,
- int *newrank,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Cart_map(&c_comm, ndims, dims, periods, newrank);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Cart_rank(
- MPI_Comm *comm,
- int *coords,
- int *rank)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Cart_rank(*comm, coords, rank);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Cart_rank(
- MPI_Comm comm,
- int *coords,
- int *rank)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Cart_rank(&comm, coords, rank);
-
- return(rc);
-}
-
-
-extern void mpi_cart_rank_(
- MPI_Fint *comm,
- int *coords,
- int *rank,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Cart_rank(&c_comm, coords, rank);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Cart_shift(
- MPI_Comm *comm,
- int *direction,
- int *displ,
- int *source,
- int *dest)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Cart_shift(*comm, *direction, *displ, source, dest);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Cart_shift(
- MPI_Comm comm,
- int direction,
- int displ,
- int *source,
- int *dest)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Cart_shift(&comm, &direction, &displ, source, dest);
-
- return(rc);
-}
-
-
-extern void mpi_cart_shift_(
- MPI_Fint *comm,
- int *direction,
- int *displ,
- int *source,
- int *dest,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Cart_shift(&c_comm, direction, displ, source, dest);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Cart_sub(
- MPI_Comm *comm,
- int *remain_dims,
- MPI_Comm *comm_new)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Cart_sub(*comm, remain_dims, comm_new);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Cart_sub(
- MPI_Comm comm,
- int *remain_dims,
- MPI_Comm *comm_new)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Cart_sub(&comm, remain_dims, comm_new);
-
- return(rc);
-}
-
-
-extern void mpi_cart_sub_(
- MPI_Fint *comm,
- int *remain_dims,
- MPI_Fint *comm_new,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Comm c_comm_new;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Cart_sub(&c_comm, remain_dims, &c_comm_new);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *comm_new = MPI_Comm_c2f(c_comm_new);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Cartdim_get(
- MPI_Comm *comm,
- int *ndims)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Cartdim_get(*comm, ndims);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Cartdim_get(
- MPI_Comm comm,
- int *ndims)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Cartdim_get(&comm, ndims);
-
- return(rc);
-}
-
-
-extern void mpi_cartdim_get_(
- MPI_Fint *comm,
- int *ndims,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Cartdim_get(&c_comm, ndims);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_create(
- MPI_Comm *comm,
- MPI_Group *group,
- MPI_Comm *comm_out)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_create(*comm, *group, comm_out);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_create(
- MPI_Comm comm,
- MPI_Group group,
- MPI_Comm *comm_out)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_create(&comm, &group, comm_out);
-
- return(rc);
-}
-
-
-extern void mpi_comm_create_(
- MPI_Fint *comm,
- MPI_Fint *group,
- MPI_Fint *comm_out,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Group c_group;
- MPI_Comm c_comm_out;
-
- c_comm = MPI_Comm_f2c(*comm);
- c_group = MPI_Group_f2c(*group);
-
- rc = commsplitter_MPI_Comm_create(&c_comm, &c_group, &c_comm_out);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *comm_out = MPI_Comm_c2f(c_comm_out);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_dup(
- MPI_Comm *comm,
- MPI_Comm *comm_out)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_dup(*comm, comm_out);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_dup(
- MPI_Comm comm,
- MPI_Comm *comm_out)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_dup(&comm, comm_out);
-
- return(rc);
-}
-
-
-extern void mpi_comm_dup_(
- MPI_Fint *comm,
- MPI_Fint *comm_out,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Comm c_comm_out;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Comm_dup(&c_comm, &c_comm_out);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *comm_out = MPI_Comm_c2f(c_comm_out);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_group(
- MPI_Comm *comm,
- MPI_Group *group)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_group(*comm, group);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_group(
- MPI_Comm comm,
- MPI_Group *group)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_group(&comm, group);
-
- return(rc);
-}
-
-
-extern void mpi_comm_group_(
- MPI_Fint *comm,
- MPI_Fint *group,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Group c_group;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Comm_group(&c_comm, &c_group);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *group = MPI_Group_c2f(c_group);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_rank(
- MPI_Comm *comm,
- int *rank)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_rank(*comm, rank);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_rank(
- MPI_Comm comm,
- int *rank)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_rank(&comm, rank);
-
- return(rc);
-}
-
-
-extern void mpi_comm_rank_(
- MPI_Fint *comm,
- int *rank,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Comm_rank(&c_comm, rank);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_remote_group(
- MPI_Comm *comm,
- MPI_Group *group)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_remote_group(*comm, group);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_remote_group(
- MPI_Comm comm,
- MPI_Group *group)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_remote_group(&comm, group);
-
- return(rc);
-}
-
-
-extern void mpi_comm_remote_group_(
- MPI_Fint *comm,
- MPI_Fint *group,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Group c_group;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Comm_remote_group(&c_comm, &c_group);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *group = MPI_Group_c2f(c_group);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_remote_size(
- MPI_Comm *comm,
- int *size)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_remote_size(*comm, size);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_remote_size(
- MPI_Comm comm,
- int *size)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_remote_size(&comm, size);
-
- return(rc);
-}
-
-
-extern void mpi_comm_remote_size_(
- MPI_Fint *comm,
- int *size,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Comm_remote_size(&c_comm, size);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_size(
- MPI_Comm *comm,
- int *size)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_size(*comm, size);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_size(
- MPI_Comm comm,
- int *size)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_size(&comm, size);
-
- return(rc);
-}
-
-
-extern void mpi_comm_size_(
- MPI_Fint *comm,
- int *size,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Comm_size(&c_comm, size);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_split(
- MPI_Comm *comm,
- int *color,
- int *key,
- MPI_Comm *comm_out)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_split(*comm, *color, *key, comm_out);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_split(
- MPI_Comm comm,
- int color,
- int key,
- MPI_Comm *comm_out)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_split(&comm, &color, &key, comm_out);
-
- return(rc);
-}
-
-
-extern void mpi_comm_split_(
- MPI_Fint *comm,
- int *color,
- int *key,
- MPI_Fint *comm_out,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Comm c_comm_out;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Comm_split(&c_comm, color, key, &c_comm_out);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *comm_out = MPI_Comm_c2f(c_comm_out);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Comm_test_inter(
- MPI_Comm *comm,
- int *flag)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Comm_test_inter(*comm, flag);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Comm_test_inter(
- MPI_Comm comm,
- int *flag)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Comm_test_inter(&comm, flag);
-
- return(rc);
-}
-
-
-extern void mpi_comm_test_inter_(
- MPI_Fint *comm,
- int *flag,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Comm_test_inter(&c_comm, flag);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Errhandler_get(
- MPI_Comm *comm,
- MPI_Errhandler *errhandler)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Errhandler_get(*comm, errhandler);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Errhandler_get(
- MPI_Comm comm,
- MPI_Errhandler *errhandler)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Errhandler_get(&comm, errhandler);
-
- return(rc);
-}
-
-
-extern void mpi_errhandler_get_(
- MPI_Fint *comm,
- MPI_Errhandler *errhandler,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Errhandler_get(&c_comm, errhandler);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Errhandler_set(
- MPI_Comm *comm,
- MPI_Errhandler *errhandler)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Errhandler_set(*comm, *errhandler);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Errhandler_set(
- MPI_Comm comm,
- MPI_Errhandler errhandler)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Errhandler_set(&comm, &errhandler);
-
- return(rc);
-}
-
-
-extern void mpi_errhandler_set_(
- MPI_Fint *comm,
- MPI_Errhandler *errhandler,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Errhandler_set(&c_comm, errhandler);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_File_open(
- MPI_Comm *comm,
- char *filename,
- int *amode,
- MPI_Info *info,
- MPI_File *fh)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_File_open(*comm, filename, *amode, *info, fh);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_File_open(
- MPI_Comm comm,
- char *filename,
- int amode,
- MPI_Info info,
- MPI_File *fh)
-{
- int rc;
-
-
- rc = commsplitter_MPI_File_open(&comm, filename, &amode, &info, fh);
-
- return(rc);
-}
-
-
-extern void mpi_file_open_(
- MPI_Fint *comm,
- char *filename,
- int *amode,
- MPI_Fint *info,
- MPI_Fint *fh,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Info c_info;
- MPI_File c_fh;
-
- c_comm = MPI_Comm_f2c(*comm);
- c_info = MPI_Info_f2c(*info);
-
- rc = commsplitter_MPI_File_open(&c_comm, filename, amode, &c_info, &c_fh);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *fh = MPI_File_c2f(c_fh);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Gather(
- void *sendbuf,
- int *sendcnt,
- MPI_Datatype *sendtype,
- void *recvbuf,
- int *recvcount,
- MPI_Datatype *recvtype,
- int *root,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Gather(sendbuf, *sendcnt, *sendtype, recvbuf, *recvcount, *recvtype, *root, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Gather(
- void *sendbuf,
- int sendcnt,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcount,
- MPI_Datatype recvtype,
- int root,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Gather(sendbuf, &sendcnt, &sendtype, recvbuf, &recvcount, &recvtype, &root, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_gather_(
- void *sendbuf,
- int *sendcnt,
- MPI_Fint *sendtype,
- void *recvbuf,
- int *recvcount,
- MPI_Fint *recvtype,
- int *root,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Gather(sendbuf, sendcnt, &c_sendtype, recvbuf, recvcount, &c_recvtype, root, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Gatherv(
- void *sendbuf,
- int *sendcnt,
- MPI_Datatype *sendtype,
- void *recvbuf,
- int *recvcnts,
- int *displs,
- MPI_Datatype *recvtype,
- int *root,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Gatherv(sendbuf, *sendcnt, *sendtype, recvbuf, recvcnts, displs, *recvtype, *root, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Gatherv(
- void *sendbuf,
- int sendcnt,
- MPI_Datatype sendtype,
- void *recvbuf,
- int *recvcnts,
- int *displs,
- MPI_Datatype recvtype,
- int root,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Gatherv(sendbuf, &sendcnt, &sendtype, recvbuf, recvcnts, displs, &recvtype, &root, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_gatherv_(
- void *sendbuf,
- int *sendcnt,
- MPI_Fint *sendtype,
- void *recvbuf,
- int *recvcnts,
- int *displs,
- MPI_Fint *recvtype,
- int *root,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Gatherv(sendbuf, sendcnt, &c_sendtype, recvbuf, recvcnts, displs, &c_recvtype, root, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Graph_create(
- MPI_Comm *comm,
- int *nnodes,
- int *index,
- int *edges,
- int *reorder,
- MPI_Comm *comm_graph)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Graph_create(*comm, *nnodes, index, edges, *reorder, comm_graph);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Graph_create(
- MPI_Comm comm,
- int nnodes,
- int *index,
- int *edges,
- int reorder,
- MPI_Comm *comm_graph)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Graph_create(&comm, &nnodes, index, edges, &reorder, comm_graph);
-
- return(rc);
-}
-
-
-extern void mpi_graph_create_(
- MPI_Fint *comm,
- int *nnodes,
- int *index,
- int *edges,
- int *reorder,
- MPI_Fint *comm_graph,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
- MPI_Comm c_comm_graph;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Graph_create(&c_comm, nnodes, index, edges, reorder, &c_comm_graph);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *comm_graph = MPI_Comm_c2f(c_comm_graph);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Graph_get(
- MPI_Comm *comm,
- int *maxindex,
- int *maxedges,
- int *index,
- int *edges)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Graph_get(*comm, *maxindex, *maxedges, index, edges);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Graph_get(
- MPI_Comm comm,
- int maxindex,
- int maxedges,
- int *index,
- int *edges)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Graph_get(&comm, &maxindex, &maxedges, index, edges);
-
- return(rc);
-}
-
-
-extern void mpi_graph_get_(
- MPI_Fint *comm,
- int *maxindex,
- int *maxedges,
- int *index,
- int *edges,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Graph_get(&c_comm, maxindex, maxedges, index, edges);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Graph_map(
- MPI_Comm *comm,
- int *nnodes,
- int *index,
- int *edges,
- int *newrank)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Graph_map(*comm, *nnodes, index, edges, newrank);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Graph_map(
- MPI_Comm comm,
- int nnodes,
- int *index,
- int *edges,
- int *newrank)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Graph_map(&comm, &nnodes, index, edges, newrank);
-
- return(rc);
-}
-
-
-extern void mpi_graph_map_(
- MPI_Fint *comm,
- int *nnodes,
- int *index,
- int *edges,
- int *newrank,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Graph_map(&c_comm, nnodes, index, edges, newrank);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Graph_neighbors(
- MPI_Comm *comm,
- int *rank,
- int *maxneighbors,
- int *neighbors)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Graph_neighbors(*comm, *rank, *maxneighbors, neighbors);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Graph_neighbors(
- MPI_Comm comm,
- int rank,
- int maxneighbors,
- int *neighbors)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Graph_neighbors(&comm, &rank, &maxneighbors, neighbors);
-
- return(rc);
-}
-
-
-extern void mpi_graph_neighbors_(
- MPI_Fint *comm,
- int *rank,
- int *maxneighbors,
- int *neighbors,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Graph_neighbors(&c_comm, rank, maxneighbors, neighbors);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Graph_neighbors_count(
- MPI_Comm *comm,
- int *rank,
- int *nneighbors)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Graph_neighbors_count(*comm, *rank, nneighbors);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Graph_neighbors_count(
- MPI_Comm comm,
- int rank,
- int *nneighbors)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Graph_neighbors_count(&comm, &rank, nneighbors);
-
- return(rc);
-}
-
-
-extern void mpi_graph_neighbors_count_(
- MPI_Fint *comm,
- int *rank,
- int *nneighbors,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Graph_neighbors_count(&c_comm, rank, nneighbors);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Graphdims_get(
- MPI_Comm *comm,
- int *nnodes,
- int *nedges)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Graphdims_get(*comm, nnodes, nedges);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Graphdims_get(
- MPI_Comm comm,
- int *nnodes,
- int *nedges)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Graphdims_get(&comm, nnodes, nedges);
-
- return(rc);
-}
-
-
-extern void mpi_graphdims_get_(
- MPI_Fint *comm,
- int *nnodes,
- int *nedges,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Graphdims_get(&c_comm, nnodes, nedges);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Iprobe(
- int *source,
- int *tag,
- MPI_Comm *comm,
- int *flag,
- MPI_Status *status)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Iprobe(*source, *tag, *comm, flag, status);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Iprobe(
- int source,
- int tag,
- MPI_Comm comm,
- int *flag,
- MPI_Status *status)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Iprobe(&source, &tag, &comm, flag, status);
-
- return(rc);
-}
-
-
-extern void mpi_iprobe_(
- int *source,
- int *tag,
- MPI_Fint *comm,
- int *flag,
- MPI_Status *status,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Iprobe(source, tag, &c_comm, flag, status);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Irecv(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *source,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Irecv(buf, *count, *datatype, *source, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Irecv(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int source,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Irecv(buf, &count, &datatype, &source, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_irecv_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *source,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Irecv(buf, count, &c_datatype, source, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Irsend(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Irsend(buf, *count, *datatype, *dest, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Irsend(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Irsend(buf, &count, &datatype, &dest, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_irsend_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Irsend(buf, count, &c_datatype, dest, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Isend(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Isend(buf, *count, *datatype, *dest, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Isend(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Isend(buf, &count, &datatype, &dest, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_isend_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Isend(buf, count, &c_datatype, dest, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Issend(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Issend(buf, *count, *datatype, *dest, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Issend(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Issend(buf, &count, &datatype, &dest, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_issend_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Issend(buf, count, &c_datatype, dest, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Pack(
- void *inbuf,
- int *incount,
- MPI_Datatype *datatype,
- void *outbuf,
- int *count,
- int *position,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Pack(inbuf, *incount, *datatype, outbuf, *count, position, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Pack(
- void *inbuf,
- int incount,
- MPI_Datatype datatype,
- void *outbuf,
- int count,
- int *position,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Pack(inbuf, &incount, &datatype, outbuf, &count, position, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_pack_(
- void *inbuf,
- int *incount,
- MPI_Fint *datatype,
- void *outbuf,
- int *count,
- int *position,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Pack(inbuf, incount, &c_datatype, outbuf, count, position, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Pack_size(
- int *incount,
- MPI_Datatype *datatype,
- MPI_Comm *comm,
- int *size)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Pack_size(*incount, *datatype, *comm, size);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Pack_size(
- int incount,
- MPI_Datatype datatype,
- MPI_Comm comm,
- int *size)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Pack_size(&incount, &datatype, &comm, size);
-
- return(rc);
-}
-
-
-extern void mpi_pack_size_(
- int *incount,
- MPI_Fint *datatype,
- MPI_Fint *comm,
- int *size,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Pack_size(incount, &c_datatype, &c_comm, size);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Probe(
- int *source,
- int *tag,
- MPI_Comm *comm,
- MPI_Status *status)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Probe(*source, *tag, *comm, status);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Probe(
- int source,
- int tag,
- MPI_Comm comm,
- MPI_Status *status)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Probe(&source, &tag, &comm, status);
-
- return(rc);
-}
-
-
-extern void mpi_probe_(
- int *source,
- int *tag,
- MPI_Fint *comm,
- MPI_Status *status,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Probe(source, tag, &c_comm, status);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Recv(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *source,
- int *tag,
- MPI_Comm *comm,
- MPI_Status *status)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Recv(buf, *count, *datatype, *source, *tag, *comm, status);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Recv(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int source,
- int tag,
- MPI_Comm comm,
- MPI_Status *status)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Recv(buf, &count, &datatype, &source, &tag, &comm, status);
-
- return(rc);
-}
-
-
-extern void mpi_recv_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *source,
- int *tag,
- MPI_Fint *comm,
- MPI_Status *status,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Recv(buf, count, &c_datatype, source, tag, &c_comm, status);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Recv_init(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *source,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Recv_init(buf, *count, *datatype, *source, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Recv_init(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int source,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Recv_init(buf, &count, &datatype, &source, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_recv_init_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *source,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Recv_init(buf, count, &c_datatype, source, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Reduce(
- void *sendbuf,
- void *recvbuf,
- int *count,
- MPI_Datatype *datatype,
- MPI_Op *op,
- int *root,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Reduce(sendbuf, recvbuf, *count, *datatype, *op, *root, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Reduce(
- void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op,
- int root,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Reduce(sendbuf, recvbuf, &count, &datatype, &op, &root, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_reduce_(
- void *sendbuf,
- void *recvbuf,
- int *count,
- MPI_Fint *datatype,
- MPI_Fint *op,
- int *root,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Op c_op;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_op = MPI_Op_f2c(*op);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Reduce(sendbuf, recvbuf, count, &c_datatype, &c_op, root, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Rsend(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Rsend(buf, *count, *datatype, *dest, *tag, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Rsend(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Rsend(buf, &count, &datatype, &dest, &tag, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_rsend_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Rsend(buf, count, &c_datatype, dest, tag, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Rsend_init(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Rsend_init(buf, *count, *datatype, *dest, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Rsend_init(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Rsend_init(buf, &count, &datatype, &dest, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_rsend_init_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Rsend_init(buf, count, &c_datatype, dest, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Scan(
- void *sendbuf,
- void *recvbuf,
- int *count,
- MPI_Datatype *datatype,
- MPI_Op *op,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Scan(sendbuf, recvbuf, *count, *datatype, *op, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Scan(
- void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Scan(sendbuf, recvbuf, &count, &datatype, &op, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_scan_(
- void *sendbuf,
- void *recvbuf,
- int *count,
- MPI_Fint *datatype,
- MPI_Fint *op,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Op c_op;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_op = MPI_Op_f2c(*op);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Scan(sendbuf, recvbuf, count, &c_datatype, &c_op, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Scatter(
- void *sendbuf,
- int *sendcnt,
- MPI_Datatype *sendtype,
- void *recvbuf,
- int *recvcnt,
- MPI_Datatype *recvtype,
- int *root,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Scatter(sendbuf, *sendcnt, *sendtype, recvbuf, *recvcnt, *recvtype, *root, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Scatter(
- void *sendbuf,
- int sendcnt,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcnt,
- MPI_Datatype recvtype,
- int root,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Scatter(sendbuf, &sendcnt, &sendtype, recvbuf, &recvcnt, &recvtype, &root, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_scatter_(
- void *sendbuf,
- int *sendcnt,
- MPI_Fint *sendtype,
- void *recvbuf,
- int *recvcnt,
- MPI_Fint *recvtype,
- int *root,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Scatter(sendbuf, sendcnt, &c_sendtype, recvbuf, recvcnt, &c_recvtype, root, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Scatterv(
- void *sendbuf,
- int *sendcnts,
- int *displs,
- MPI_Datatype *sendtype,
- void *recvbuf,
- int *recvcnt,
- MPI_Datatype *recvtype,
- int *root,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Scatterv(sendbuf, sendcnts, displs, *sendtype, recvbuf, *recvcnt, *recvtype, *root, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Scatterv(
- void *sendbuf,
- int *sendcnts,
- int *displs,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcnt,
- MPI_Datatype recvtype,
- int root,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Scatterv(sendbuf, sendcnts, displs, &sendtype, recvbuf, &recvcnt, &recvtype, &root, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_scatterv_(
- void *sendbuf,
- int *sendcnts,
- int *displs,
- MPI_Fint *sendtype,
- void *recvbuf,
- int *recvcnt,
- MPI_Fint *recvtype,
- int *root,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Scatterv(sendbuf, sendcnts, displs, &c_sendtype, recvbuf, recvcnt, &c_recvtype, root, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Send(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Send(buf, *count, *datatype, *dest, *tag, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Send(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Send(buf, &count, &datatype, &dest, &tag, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_send_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Send(buf, count, &c_datatype, dest, tag, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Send_init(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Send_init(buf, *count, *datatype, *dest, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Send_init(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Send_init(buf, &count, &datatype, &dest, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_send_init_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Send_init(buf, count, &c_datatype, dest, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Sendrecv(
- void *sendbuf,
- int *sendcount,
- MPI_Datatype *sendtype,
- int *dest,
- int *sendtag,
- void *recvbuf,
- int *recvcount,
- MPI_Datatype *recvtype,
- int *source,
- int *recvtag,
- MPI_Comm *comm,
- MPI_Status *status)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Sendrecv(sendbuf, *sendcount, *sendtype, *dest, *sendtag, recvbuf, *recvcount, *recvtype, *source, *recvtag, *comm, status);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Sendrecv(
- void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- int dest,
- int sendtag,
- void *recvbuf,
- int recvcount,
- MPI_Datatype recvtype,
- int source,
- int recvtag,
- MPI_Comm comm,
- MPI_Status *status)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Sendrecv(sendbuf, &sendcount, &sendtype, &dest, &sendtag, recvbuf, &recvcount, &recvtype, &source, &recvtag, &comm, status);
-
- return(rc);
-}
-
-
-extern void mpi_sendrecv_(
- void *sendbuf,
- int *sendcount,
- MPI_Fint *sendtype,
- int *dest,
- int *sendtag,
- void *recvbuf,
- int *recvcount,
- MPI_Fint *recvtype,
- int *source,
- int *recvtag,
- MPI_Fint *comm,
- MPI_Status *status,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_sendtype;
- MPI_Datatype c_recvtype;
- MPI_Comm c_comm;
-
- c_sendtype = MPI_Type_f2c(*sendtype);
- c_recvtype = MPI_Type_f2c(*recvtype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Sendrecv(sendbuf, sendcount, &c_sendtype, dest, sendtag, recvbuf, recvcount, &c_recvtype, source, recvtag, &c_comm, status);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Sendrecv_replace(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *sendtag,
- int *source,
- int *recvtag,
- MPI_Comm *comm,
- MPI_Status *status)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Sendrecv_replace(buf, *count, *datatype, *dest, *sendtag, *source, *recvtag, *comm, status);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Sendrecv_replace(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int sendtag,
- int source,
- int recvtag,
- MPI_Comm comm,
- MPI_Status *status)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Sendrecv_replace(buf, &count, &datatype, &dest, &sendtag, &source, &recvtag, &comm, status);
-
- return(rc);
-}
-
-
-extern void mpi_sendrecv_replace_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *sendtag,
- int *source,
- int *recvtag,
- MPI_Fint *comm,
- MPI_Status *status,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Sendrecv_replace(buf, count, &c_datatype, dest, sendtag, source, recvtag, &c_comm, status);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Ssend(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Ssend(buf, *count, *datatype, *dest, *tag, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Ssend(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Ssend(buf, &count, &datatype, &dest, &tag, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_ssend_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Ssend(buf, count, &c_datatype, dest, tag, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Ssend_init(
- void *buf,
- int *count,
- MPI_Datatype *datatype,
- int *dest,
- int *tag,
- MPI_Comm *comm,
- MPI_Request *request)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Ssend_init(buf, *count, *datatype, *dest, *tag, *comm, request);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Ssend_init(
- void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPI_Comm comm,
- MPI_Request *request)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Ssend_init(buf, &count, &datatype, &dest, &tag, &comm, request);
-
- return(rc);
-}
-
-
-extern void mpi_ssend_init_(
- void *buf,
- int *count,
- MPI_Fint *datatype,
- int *dest,
- int *tag,
- MPI_Fint *comm,
- MPI_Fint *request,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
- MPI_Request c_request;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Ssend_init(buf, count, &c_datatype, dest, tag, &c_comm, &c_request);
-
- *ierr = (MPI_Fint)rc;
- if (rc == MPI_SUCCESS) {
- *request = MPI_Request_c2f(c_request);
- }
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Topo_test(
- MPI_Comm *comm,
- int *top_type)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Topo_test(*comm, top_type);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Topo_test(
- MPI_Comm comm,
- int *top_type)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Topo_test(&comm, top_type);
-
- return(rc);
-}
-
-
-extern void mpi_topo_test_(
- MPI_Fint *comm,
- int *top_type,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Comm c_comm;
-
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Topo_test(&c_comm, top_type);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Unpack(
- void *inbuf,
- int *insize,
- int *position,
- void *outbuf,
- int *count,
- MPI_Datatype *datatype,
- MPI_Comm *comm)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Unpack(inbuf, *insize, position, outbuf, *count, *datatype, *comm);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Unpack(
- void *inbuf,
- int insize,
- int *position,
- void *outbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Comm comm)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Unpack(inbuf, &insize, position, outbuf, &count, &datatype, &comm);
-
- return(rc);
-}
-
-
-extern void mpi_unpack_(
- void *inbuf,
- int *insize,
- int *position,
- void *outbuf,
- int *count,
- MPI_Fint *datatype,
- MPI_Fint *comm,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Datatype c_datatype;
- MPI_Comm c_comm;
-
- c_datatype = MPI_Type_f2c(*datatype);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Unpack(inbuf, insize, position, outbuf, count, &c_datatype, &c_comm);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
-
-
-
-
-
-static int commsplitter_MPI_Win_create(
- void *base,
- MPI_Aint *size,
- int *disp_unit,
- MPI_Info *info,
- MPI_Comm *comm,
- MPI_Win *win)
-{
- int rc, compare_result, enabled_state;
- MPI_Comm orig_comm;
-
- if (commsplitter_data.enabled) {
- SUBSTITUTE_COMM;
- }
-
- enabled_state = commsplitter_data.enabled;
- commsplitter_data.enabled = 0;
-
- rc = PMPI_Win_create(base, *size, *disp_unit, *info, *comm, win);
-
- commsplitter_data.enabled = enabled_state;
- if (commsplitter_data.enabled) {
- RESTORE_COMM;
- }
-
- return(rc);
-}
-
-
-
-extern int MPI_Win_create(
- void *base,
- MPI_Aint size,
- int disp_unit,
- MPI_Info info,
- MPI_Comm comm,
- MPI_Win *win)
-{
- int rc;
-
-
- rc = commsplitter_MPI_Win_create(base, &size, &disp_unit, &info, &comm, win);
-
- return(rc);
-}
-
-
-extern void mpi_win_create_(
- void *base,
- MPI_Aint *size,
- int *disp_unit,
- MPI_Fint *info,
- MPI_Fint *comm,
- MPI_Win *win,
- MPI_Fint *ierr)
-{
- int rc;
-
- MPI_Info c_info;
- MPI_Comm c_comm;
-
- c_info = MPI_Info_f2c(*info);
- c_comm = MPI_Comm_f2c(*comm);
-
- rc = commsplitter_MPI_Win_create(base, size, disp_unit, &c_info, &c_comm, win);
-
- *ierr = (MPI_Fint)rc;
- return;
-}
diff --git a/packages/trios/libraries/nessie/CMakeLists.txt b/packages/trios/libraries/nessie/CMakeLists.txt
deleted file mode 100644
index fabddedf00c5..000000000000
--- a/packages/trios/libraries/nessie/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-
-# @HEADER
-# ************************************************************************
-#
-# Trios: Trilinos I/O Support
-# Copyright 2011 Sandia Corporation
-#
-# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-# the U.S. Government retains certain rights in this software.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. 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.
-#
-# 3. Neither the name of the Corporation nor the names of the
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-# 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.
-#
-# Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-#
-# *************************************************************************
-# @HEADER
-
-INCLUDE(TriosProcessXDR)
-
diff --git a/packages/trios/libraries/nessie/client/Trios_nssi_client.h b/packages/trios/libraries/nessie/client/Trios_nssi_client.h
deleted file mode 100644
index 660bd28494b4..000000000000
--- a/packages/trios/libraries/nessie/client/Trios_nssi_client.h
+++ /dev/null
@@ -1,567 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-
-/*-------------------------------------------------------------------------*/
-/**
- * @file nssi_client.h
- *
- * @brief Prototypes for the client-side methods for RPC.
- *
- * @author Ron Oldfield (raoldfi\@sandia.gov)
- * @author Rolf Riesen (rolf\@cs.sandia.gov)
- * $Revision: 1640 $
- * $Date: 2007-11-28 11:59:53 -0700 (Wed, 28 Nov 2007) $
- */
-
-#ifndef _NSSI_RPC_CLNT_H_
-#define _NSSI_RPC_CLNT_H_
-
-#include "Trios_nssi_request.h"
-#include "Trios_nssi_rpc.h"
-#include "Trios_nssi_xdr.h"
-
-/**
- * @defgroup rpc_client_api Nessie Client API
- *
- * An NSSI client communicates with remote services using an
- * asynchronous, remote procedure call (RPC) interface.
- * As described in @latexonly Section~\ref{sec:Data-movement},@endlatexonly
- * this interface uses the Portals message passing API to
- * take advantage of special features of the network such
- * as RDMA and OS bypass.
- *
- * The typical usage scenerio includes the following steps:
- *
- * -# Obtain the service description by calling the
- * \ref nssi_lookup_service "\c nssi_lookup_service()" or
- * \ref nssi_get_service "\c nssi_get_service()" functions. The service
- * description, represented by the ref nssi_service data structure,
- * contains details about how to communicate with the
- * server, including the remote memory address reserved for incoming
- * requests and the encoding scheme to use for control messages.
- * -# Call the asynchronous \ref nssi_call_rpc "\c nssi_call_rpc()" function
- * specifying the operation and providing buffer space for
- * arguments, bulk data, and results. The buffers must remain
- * unmodified by the client until the remote operation completes.
- * -# To check for completion, call the functions \ref nssi_wait "\c nssi_wait()",
- * \ref nssi_timedwait "\c nssi_timedwait()", or \ref nssi_test "\c nssi_test"
- * with the \ref nssi_request data structure that was created
- * by the \ref nssi_call_rpc "\c nssi_call_rpc()" function.
- *
- * This remainder of this section contains descriptions of the
- * data structures, special data types, and functions that support
- * client/service communication.
- *
- */
-
-/**
- * @ingroup rpc_client_api
- * @brief Register a client stub.
- *
- * RPC calls require client and server stubs.
- * This function registers the client operation and
- * assigs the appropriate xdr-encoding functions for
- * the arguments, data, and result data structures.
- */
-#define NSSI_REGISTER_CLIENT_STUB(opcode, argtype, datatype, rettype) \
- nssi_register_xdr_encoding(opcode, (xdrproc_t)&xdr_ ## argtype, \
- (xdrproc_t)&xdr_ ## datatype, \
- (xdrproc_t)&xdr_ ## rettype)
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-#if defined(__STDC__) || defined(__cplusplus)
-
-
- /*
- * @brief Initialize an RPC client.
- *
- * The \ref nssi_rpc_clnt_init function is a blocking call
- * that initializes all internal data structures needed by an
- * NSSI RPC client. This method is called at least once for each
- * remote server that the client expects to use, and the implementation
- * of this function may require a communication with that server.
- *
- * @param server_id The process ID of the remote server.
- * @param result Points to a data structure that holds information
- * about how to send RPC requests to the remote server.
- *
- * @return \ref NSSI_OK Indicates success.
- * @return \ref NSSI_EBADRPC Indicates an failure in the
- * communication library.
- * @return \ref NSSI_ETIMEDOUT Indicates that the client timed out
- * trying to communicate with the server.
- *
- */
- extern int nssi_rpc_clnt_init(
- NNTI_transport_id_t transport,
- const char *url,
- nssi_service *result);
-
- /**
- * @brief Initialize an NSSI client.
- *
- * This function must be called before any other calls to
- * the Nessie API.
- */
- extern int nssi_init(const nssi_rpc_transport transport_id);
-
- /**
- * @brief Finalize an NSSI client.
- *
- */
- extern int nssi_fini(const nssi_rpc_transport transport_id);
-
- /**
- * @ingroup rpc_client_api
- *
- * @brief Get the service descripton from a known host.
- *
- * The \ref nssi_get_service function contacts a
- * remote process to fetch the service description that
- * describes how to send and receive RPC requests to the
- * service.
- *
- * @param server_id Identifies the host and process ID of the
- * remote service.
- * @param timeout The max amount of time (ms) for the operation. Use -1 for infinite.
- * @param result Points to the service description of the
- * remote service.
- *
- * @return \ref NSSI_OK Indicates success.
- * @return \ref NSSI_EBADRPC Indicates a failure in the communication
- * library.
- * @return \ref NSSI_ETIMEDOUT Indicates that the client timed out
- * trying to communicate with the server.
- */
- extern int nssi_get_service(
- const nssi_rpc_transport rpc_transport,
- const char *url,
- const int timeout,
- nssi_service *result);
-
-
- /**
- * @ingroup rpc_client_api
- *
- * @brief Get an array of service descriptons.
- *
- * The \ref nssi_get_services function contacts
- * remote processes to fetch service descriptions.
- *
- * @param server_id Identifies the host and process ID of the
- * remote service.
- * @param count The number of service descriptors to get.
- * @param timeout The max amount of time (ms) for the operation. Use -1 for infinite.
- * @param result Points to the service description of the
- * remote service.
- *
- * @return \ref NSSI_OK Indicates success.
- * @return \ref NSSI_EBADRPC Indicates a failure in the communication
- * library.
- * @return \ref NSSI_ETIMEDOUT Indicates that the client timed out
- * trying to communicate with the server.
- */
- extern int nssi_get_services(
- const nssi_rpc_transport rpc_transport,
- const char **url,
- const int num_servers,
- const int timeout,
- nssi_service *result);
-
- extern int nssi_free_service(
- const nssi_rpc_transport rpc_transport,
- nssi_service *svc);
-
- /**
- * @brief Reset tracing on a designated service.
- */
- extern int nssi_trace_reset(
- const nssi_service *svc,
- const char *trace_fname,
- const int trace_ftype,
- const char *enable,
- const long timeout);
-
- extern int nssi_kill(
- const nssi_service *svc,
- const int sig,
- const long timeout);
-
-
-
- /**
- * @brief Setup an RPC request.
- *
- * @ingroup rpc_ptl_impl
- *
- * This method populates an RPC request. All input parameters are copied
- * into the request. The request can be used to send the RPC to the service
- * and wait for the result
- *
- * @param svc @input descriptor for the NSSI service.
- * @param opcode @input descriptor for the remote method.
- * @param args @input pointer to the arguments.
- * @param data @input pointer to data (for bulk data transfers).
- * @param data_size @input length of data buffer
- * @param result @input where to put results.
- * @param request @output The request handle (used to test for
- * completion).
- */
- extern int nssi_create_request(
- const nssi_service *svc,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_size,
- void *result,
- nssi_request *request);
-
- /**
- * @brief Send an RPC request to an NSSI server.
- *
- * @ingroup rpc_ptl_impl
- *
- * This method encodes and transfers an RPC request header and
- * operation arguments to an NSSI server using NNTI. If the
- * arguments are sufficiently small, \b nssi_send_request sends
- * the request header and the arguments in a single message.
- * If the arguments are large (i.e., too large for the request buffer),
- * the server fetches the arguments from a client-side buffer.
- *
- * @param request @inout The request handle (used to test for completion).
- */
- extern int nssi_send_request(
- nssi_request *request);
-
- /**
- * @brief Call a remote procedure.
- *
- * @ingroup rpc_client_api
- *
- * The nssi_call_rpc() function encodes and
- * transfers an RPC request to an NSSI server. It returns
- * an integer value that corresponds to a return code
- * defined in the enumerator \ref nssi_return_codes;
- * however, since the function does not wait for completion
- * of the remote method, the return value only indicates
- * success or failure of marshaling and tranferring
- * the request to the server, not the success of the
- * remote method.
- *
- * The arguments include the function-specific set of arguments
- * required by the remote function, optional data and result
- * arguments, and the \ref nssi_request data
- * structure that holds all required information about the
- * pending request.
- *
- * The ``data'' argument is reserved for functions that perform
- * bulk data transfers between the client and the server.
- * This argument points to client-side memory buffer
- * that the server pulls from (e.g., for reads) or puts
- * into (e.g., for writes). This buffer must remain
- * unmodified by the client until the remote function completes.
- *
- * The ``result'' argument is reserved for functions that
- * expect a non-integer ``control'' response from the server.
- * The type of the result argument is function specific and points to the
- * client-side buffer reserved for that data. At first glance,
- * this may seem similar to the data argument; however, there
- * are several important distinctions:
- *
- * -# Results are always directed from the server to the client,
- * but data could flow in either direction.
- * -# Data is typically large in comparison to the ``control'' structures
- * (arguments and results). A clever implementation may transfer
- * args and results over a network channel optimized for small
- * messages, but transfer data over a network channel optimized
- * for bulk transfers.
- * -# Results are encoded in a portable binary format before transfer,
- * data is transferred as ``raw'' binary data.
- *
- * The final argument is a pointer to the \ref nssi_request structure that
- * contains all required information about the pending request, including
- * the \ref nssi_request_status "status" of the pending
- * request and the return code of the remote method (if complete).
- * The client calls the functions nssi_get_status(),
- * nssi_test(), or nssi_wait()
- * to asynchronously get the status of a pending request, test for
- * completion, or wait for completion of a request.
- *
- * @param svc Points to the data structure that describes how
- * to communicate with the remote service.
- * @param opcode Identifies the remote operation to execute.
- * @param args Points to the unencoded arguments for the remote request.
- * @param data In not null, points to memory reserved for bulk data
- * this buffer must remain available while the request
- * is pending.
- * @param data_len The length of the data buffer (if not null).
- * @param result Points to a memory reserved for result. This buffer must
- * remain available until the request completes.
- * @param req Points to a data structure that holds information about
- * the pending request.
- *
- * @return \ref NSSI_OK Indicates success of encoding and transferring the request.
- * @return \ref NSSI_EENCODE Indicates an error encoding the request.
- * @return \ref NSSI_EBADRPC Indicates an error in the underlying transport library
- * while transferring the request.
- * @return \ref NSSI_ENOTSUP Indicates an unsupported transport mechanism.
- */
- extern int nssi_call_rpc(
- const nssi_service *svc,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_len,
- void *result,
- nssi_request *request);
-
-
- /**
- * @brief Blocking remote rpc call.
- *
- *
- */
- extern int nssi_call_rpc_sync(
- const nssi_service *svc,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_len,
- void *result);
-
- /**
- * @brief Test for completion of an RPC request.
- *
- * @ingroup rpc_client_api
- *
- * The \ref nssi_test function checks the status of the specified
- * request and returns TRUE if the status is equal to \ref NSSI_REQUEST_COMPLETE
- * or \ref NSSI_REQUEST_ERROR .
- *
- * @param req Points to the data structure that holds information
- * about the request.
- * @param rc If the request is complete, points to the return code
- * of the completed request. Undefined otherwise.
- *
- * @return TRUE Indicates that the request is complete.
- * @return FALSE Indicates that the request is not complete.
- */
- extern int nssi_test(
- nssi_request *req,
- int *rc);
-
- /**
- * @brief Wait for a fixed amount of time for an RPC request to complete.
- *
- * @ingroup rpc_client_api
- *
- * The \ref nssi_timedwait function blocks for no more than
- * \em timeout milliseconds waiting for the remote procedure to complete.
- *
- * @param req Points to the request structure associated with the
- * remote function.
- * @param timeout The maximum amount of time (milliseconds) that the
- * function will block waiting for the remote function
- * to complete.
- * @param remote_rc If the remote function completes, this parameter is
- * the return code of the remote method. Undefined otherwise.
- *
- * @return \ref NSSI_OK Indicates that the remote function completed
- * (possibly with an error).
- * @return \ref NSSI_EBADRPC Indicates failure in the low-level transport mechanism.
- * @return \ref NSSI_ETIMEDOUT Indicates that the remote procedure failed to complete
- * within the alloted time.
- */
- extern int nssi_timedwait(
- nssi_request *req,
- int timeout,
- int *remote_rc);
-
- /**
- * @brief Wait for an RPC request to complete.
- *
- * @ingroup rpc_client_api
- *
- * The \ref nssi_wait function blocks until the remote procedure
- * associated with an RPC request completes.
- *
- * @param req Points to the request structure associated with the
- * remote function.
- * @param rc If the remote function completes, this parameter is
- * the return code of the remote method. Undefined otherwise.
- *
- * @return \ref NSSI_OK Indicates that the remote function is complete
- * (possibly with an error).
- * @return \ref NSSI_EBADRPC Indicates failure in the low-level transport mechanism.
- */
- extern int nssi_wait(
- nssi_request *req,
- int *rc);
-
-
- /**
- * @brief Wait for any request to complete.
- *
- * @ingroup rpc_client_api
- *
- * The \ref nssi_waitany function blocks for no more than
- * \em timeout milliseconds waiting for any one of an array of requests
- * to complete.
- *
- * @param req_array Points to an array of requests.
- * @param req_count The size of the request array.
- * @param timeout The maximum amount of time (milliseconds) that the
- * function will block waiting for a request to complete.
- * @param which The index of the complete request.
- * @param remote_rc The return code of the completed request.
- *
- * @return \ref NSSI_OK Indicates that a request completed
- * (possibly with an error).
- * @return \ref NSSI_EBADRPC Indicates failure in the low-level transport mechanism.
- * @return \ref NSSI_ETIMEDOUT Indicates that no request completed
- * within the alloted time.
- */
- extern int nssi_waitany(
- nssi_request *req_array,
- nssi_size req_count,
- int timeout,
- int *which,
- int *remote_rc);
-
-
- /**
- * @brief Wait for all requests to complete.
- *
- * A request is not complete unless we receive the short
- * result.
- *
- * @param req_array The array of pending requests.
- * @param req_count The number of pending requests.
- * @param timeout The time to wait for any one request.
- *
- */
- extern int nssi_waitall(
- nssi_request *req_array,
- nssi_size req_count,
- int timeout);
-
-
- /**
- * @brief Return the status of an RPC request.
- *
- * @ingroup rpc_client_api
- *
- * The \ref nssi_get_status function returns the status (if known)
- * of a remote request. This function is primarily used for
- * debugging.
- *
- * @param req Points to the request structure associated with the
- * remote function.
- * @param status The state of the pending request.
- * @param rc If the status of the remote function is complete,
- * this parameter holds the return code of the remote
- * method. Undefined otherwise.
- *
- * @return \ref NSSI_OK Indicates success.
- * @return \ref NSSI_EBADRPC Indicates failure to get the status.
- */
- extern int nssi_get_status(
- nssi_request *req,
- int *status,
- int *rc);
-
- extern int nssi_multicast_rpc(
- const nssi_service *svcs,
- const nssi_size num_svcs,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_size,
- void *results,
- nssi_size result_size, /* size in bytes of the result */
- nssi_request *requests);
-
- extern int nssi_multicast_rpc_sync(
- const nssi_service *svcs,
- const nssi_size num_svcs,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_size,
- void *results,
- nssi_size result_size);
-
-
- extern int nssi_atomic_increment(
- const nssi_service *svc,
- const uint64_t remote_atomic,
- const uint64_t local_atomic);
-
- extern int nssi_atomic_decrement(
- const nssi_service *svc,
- const uint64_t remote_atomic,
- const uint64_t local_atomic);
-
- extern int nssi_atomic_read(
- const nssi_service *svc,
- const uint64_t local_atomic,
- int64_t *value);
-
-
-#else /* K&R C */
-#endif
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/packages/trios/libraries/nessie/client/Trios_nssi_request.h b/packages/trios/libraries/nessie/client/Trios_nssi_request.h
deleted file mode 100644
index f41a0515acc5..000000000000
--- a/packages/trios/libraries/nessie/client/Trios_nssi_request.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*-------------------------------------------------------------------------*/
-/**
- * @file nssi_request.h
- *
- * @brief Definition of the nssi_request data structure.
- *
- *
- * @author Ron Oldfield (raoldfi\@sandia.gov)
- */
-
-#ifndef _NSSI_REQUEST_H
-#define _NSSI_REQUEST_H
-
-
-struct nssi_request;
-
-#include "Trios_nssi_rpc.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /**
- * @ingroup base_types
- *
- * @brief States for a pending RPC request.
- *
- * The \ref nssi_request_status enumerator provides
- * integer values that identify the state of a pending NSSI request.
- */
- enum nssi_request_status {
- /** @brief The request is complete with an error. */
- NSSI_REQUEST_ERROR = -1,
-
- /** @brief The request has no/null status. */
- NSSI_REQUEST_NULL = 0,
-
- /** @brief The client is sending the request to server. */
- NSSI_SENDING_REQUEST = 1,
-
- /** @brief The remote server is processing the request. */
- NSSI_PROCESSING_REQUEST,
-
- /** @brief The client is processing the result. */
- NSSI_PROCESSING_RESULT,
-
- /** @brief The last wait operation timed out. */
- NSSI_REQUEST_TIMEDOUT,
-
- /** @brief The request is complete. */
- NSSI_REQUEST_COMPLETE
- };
-
- typedef enum nssi_request_status nssi_request_status;
-
- /**
- * @ingroup base_types
- *
- * @brief The request structure.
- *
- * The \ref nssi_request structure represents a pending NSSI
- * request. It contains a unique identifier and pointers to all
- * data structures and buffers needed to send the request to the
- * remote server and to process the result when the server completes.
- *
- * \todo We need to abstract out the implementation-specific portions
- * of this data structure. These include the fields to encode/decode
- * arguments and the all of the Portals data structures.
- */
- struct nssi_request {
- /** @brief The remote service that is handling this request. */
- const nssi_service *svc;
-
- int job_type;
-
- /** @brief An ID for this request. */
- unsigned long id;
-
- /** @brief The opcode of the remote function. */
- int opcode;
-
- /** @brief If TRUE, nssi_send_request() will mark this request complete - long args, bulk data and short result are not allowed. */
- int8_t is_responseless;
-
- /** @brief If TRUE, nssi_send_request() will wait for this request to complete. */
- int8_t is_sync;
-
- /** @brief If is_sync==TRUE, the timeout for nssi_timedwait(). */
- int8_t sync_timeout;
-
- /** @brief The error code of request. This value will be \ref NSSI_OK unless the
- * request status=\ref NSSI_REQUEST_ERROR . */
- int error_code;
-
- /** @brief Status of the pending request */
- nssi_request_status status;
-
-
- /***********************
- ** Short Request
- ***********************/
- /** @brief If TRUE, the app pinned the short request buffer, so do not unpin/free at cleanup. */
- int8_t app_pinned_short_request;
- /** @brief Handle for the buffer where the short request will be put. */
- NNTI_buffer_t *short_request_hdl;
- NNTI_buffer_t short_request;
- /** @brief Work request to track the short request transfer. */
- NNTI_work_request_t short_request_wr;
-
- /***********************
- ** Long Args
- ***********************/
- /** @brief If TRUE, the app pinned the long args buffer, so do not unpin/free at cleanup. */
- int8_t app_pinned_long_args;
- int use_long_args;
- /** @brief Points to the memory reserved for the args. */
- void *args;
- /** @brief Points to the XDR function used to encode arguments. */
- xdrproc_t xdr_encode_args;
- /** @brief Handle for the buffer where the long arguments reside. */
- NNTI_buffer_t *long_args_hdl;
- NNTI_buffer_t long_args;
- /** @brief Work request to track the long arguments transfer. */
- NNTI_work_request_t long_args_wr;
-
- /***********************
- ** Bulk Data
- ***********************/
- /** @brief If TRUE, the app pinned the bulk data buffer, so do not unpin/free at cleanup. */
- int8_t app_pinned_bulk_data;
- /** @brief Points to the memory reserved for the bulk data transfers (NULL if not used). */
- void *data;
- /** @brief The max size of the memory used for bulk transfers. */
- uint32_t data_size;
- /** @brief Points to the XDR function used to encode data. */
- xdrproc_t xdr_encode_data;
- /** @brief Handle for the buffer where the data reside. */
- NNTI_buffer_t *bulk_data_hdl;
- NNTI_buffer_t bulk_data;
- /** @brief Work request to track the bulk data transfer. */
- NNTI_work_request_t bulk_data_wr;
-
- /***********************
- ** Short Result
- ***********************/
- /** @brief If TRUE, the app pinned the short result buffer, so do not unpin/free at cleanup. */
- int8_t app_pinned_short_result;
- /** @brief Points to the memory reserved for the result. */
- void *result;
- /** @brief Points to the XDR function used to decode the result. */
- xdrproc_t xdr_decode_result;
- /** @brief Handle for the buffer where the short result will be put. */
- NNTI_buffer_t *short_result_hdl;
- NNTI_buffer_t short_result;
- /** @brief Work request to track the short result transfer. */
- NNTI_work_request_t short_result_wr;
-
- /***********************
- ** Callback
- ***********************/
- /** @brief A callback function used by the wait() function when a request is complete. */
- int (*callback)(struct nssi_request *);
- /** @brief Optional arguments for the callback function. */
- void *callback_args;
-
- };
-
- typedef struct nssi_request nssi_request;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/packages/trios/libraries/nessie/client/nssi_client.cpp b/packages/trios/libraries/nessie/client/nssi_client.cpp
deleted file mode 100644
index 12211f58679f..000000000000
--- a/packages/trios/libraries/nessie/client/nssi_client.cpp
+++ /dev/null
@@ -1,2424 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*-------------------------------------------------------------------------*/
-/** @file rpc_client.cc
- *
- * @brief Implementation of the \ref rpc_client_api "RPC Client API".
- * for the NSSI.
- *
- * @author Ron Oldfield (raoldfi\@sandia.gov)
- * $Revision: 1640 $
- * $Date: 2007-11-28 11:59:53 -0700 (Wed, 28 Nov 2007) $
- *
- */
-#include "Trios_config.h"
-#include "Trios_nssi_client.h"
-#include "Trios_nssi_request.h"
-#include "Trios_nssi_types.h"
-#include "Trios_nssi_fprint_types.h"
-#include "Trios_nnti_fprint_types.h"
-#include "Trios_logger.h"
-#include "Trios_threads.h"
-#include "Trios_timer.h"
-#include "buffer_queue.h"
-#include "Trios_nssi_rpc.h"
-#include "Trios_nssi_xdr.h"
-#include "Trios_nssi_debug.h"
-
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-#ifdef HAVE_TRIOS_MALLOC_H
-#include
-#endif
-
-#include
-#include
-#include
-#include
-
-
-#include "nssi_opcodes.h"
-#include "nssi_service_args.h"
-
-
-#include "Trios_nnti.h"
-
-#define MIN_TIMEOUT 1000
-
-#define MAX_RETRIES 50
-
-extern NNTI_transport_t transports[NSSI_RPC_COUNT];
-extern nssi_config_t nssi_config;
-
-static bool client_initialized = false;
-
-static nthread_counter_t request_count;
-
-extern trios_buffer_queue_t send_bq;
-extern trios_buffer_queue_t recv_bq;
-extern trios_buffer_queue_t rdma_target_bq;
-extern trios_buffer_queue_t rdma_get_bq;
-extern trios_buffer_queue_t rdma_put_bq;
-
-/**
- * @addtogroup rpc_ptl_impl
- *
- * This section describes a portals implementation of the
- * NSSI asynchrounous \ref rpc_api "RPC" mechanism.
- */
-
-/*--------------------------- Private methods ------------------- */
-
-#ifdef ANSI_FUNC
-
-static int client_init(void)
-#else
-
-static int
-client_init ()
-#endif
-{
- int rc = NSSI_OK;
-
- if (client_initialized) {
- return rc;
- }
-
- // Initialize the thread counter
- nthread_counter_init(&request_count);
-
- NSSI_REGISTER_CLIENT_STUB(NSSI_OP_GET_SERVICE, void, void, nssi_service);
- NSSI_REGISTER_CLIENT_STUB(NSSI_OP_KILL_SERVICE, nssi_kill_service_args, void, void);
- NSSI_REGISTER_CLIENT_STUB(NSSI_OP_TRACE_RESET, nssi_trace_reset_args, void, void);
-
- client_initialized = true;
-
- return rc;
-}
-
-/**
- * @brief Clean up portals data structures associated with
- * operation requests.
- *
- * @ingroup rpc_ptl_impl
- *
- * This method frees memory and data structures created in
- * the prepare_request and prepare_result methods.
- *
- *
- * If the arguments were too large for the short request, the
- * process_request method allocated memory for the encoded
- * arguments and all portals data structures for the arguments.
- *
- * For results, the process_request method allocates space for
- * the encoded short result and portals data structures associated
- * with the short result.
- */
-static int cleanup(nssi_request *request)
-{
- return NSSI_OK;
-}
-
-
-/**
- * @brief Process the result of an operation request.
- *
- * @ingroup rpc_ptl_impl
- *
- * After processing an operation request, a NSSI server
- * sends a short result back to the client. If the
- * contents of the result do not fit into the short result
- * the server stores the result until the client can fetch
- * it.
- *
- * This client-side method executes after the short
- * result arrives at the client. It decodes the
- * result header, possibly fetches the results from
- * the server, and decodes the result.
- *
- * @param encoded_short_res @input The result buffer received from the server.
- * @param request @input The request data structure.
- */
-static int process_result(char *encoded_short_res_buf, nssi_request *request)
-{
-
- int rc = NSSI_OK; /* return code */
- uint32_t result_size;
- nssi_result_header header;
- void *decoded_result = NULL;
- XDR hdr_xdrs;
- XDR res_xdrs;
-
- trios_declare_timer(call_time);
-
- NNTI_buffer_t encoded_long_res_hdl;
- NNTI_work_request_t encoded_long_res_wr;
- NNTI_status_t status;
-
- NNTI_buffer_t long_res_ack_hdl;
- NNTI_work_request_t long_res_ack_wr;
- NNTI_status_t long_res_ack_status;
-
- log_level debug_level = rpc_debug_level;
-
- /* assign the result decoding function */
- xdrproc_t xdr_decode_result = request->xdr_decode_result;
-
- log_debug(debug_level,"Start processing result, status=%d", request->status);
-
- /** set the status to processing */
- request->status = NSSI_PROCESSING_RESULT;
-
- /* initialize the header */
- memset(&header, 0, sizeof(nssi_result_header));
-
- xdrmem_create(&hdr_xdrs,
- encoded_short_res_buf,
- NSSI_SHORT_RESULT_SIZE,
- XDR_DECODE);
-
- /* decode the header */
- log_debug(debug_level,"decoding result header...");
-
- trios_start_timer(call_time);
- if (! xdr_nssi_result_header(&hdr_xdrs, &header)) {
- log_fatal(rpc_debug_level,"failed to decode the result header");
- rc = NSSI_EDECODE;
- goto cleanup;
- }
- trios_stop_timer("xdr_nssi_result_header - decode", call_time);
-
- if (logging_debug(debug_level)) {
- fprint_nssi_result_header(logger_get_file(), "header", "DEBUG", &header);
- }
-
- /* what to do if the remote code had an error */
- if (header.rc != NSSI_OK) {
- request->status = NSSI_REQUEST_ERROR;
- request->error_code = header.rc;
- rc = NSSI_OK;
- goto cleanup;
- }
-
- /* get result size from the header */
- result_size = header.result_size;
-
- if (result_size > 0) {
-
- /* decode the result */
- log_debug(debug_level,"getting the result (size == %d)...", result_size);
- decoded_result = request->result;
-
- /* extract result from header */
- if (!header.fetch_result) {
- log_debug(debug_level,"decoding the result...");
- trios_start_timer(call_time);
- if (!xdr_decode_result(&hdr_xdrs, decoded_result)) {
- log_fatal(debug_level,"failed to decode the result");
- rc = NSSI_EDECODE;
- goto cleanup;
- }
- trios_stop_timer("xdr_decode_result - decode", call_time);
- }
-
- /* else fetch the result from the server */
- else {
- log_debug(debug_level,"fetching result (%d bytes) "
- "from server...", result_size);
-
- /* allocate space for result */
- trios_start_timer(call_time);
- rc=NNTI_alloc(
- &transports[request->svc->transport_id],
- result_size,
- 1,
- NNTI_GET_DST,
- &encoded_long_res_hdl);
- trios_stop_timer("NNTI_register_memory - long result", call_time);
- if (rc != NNTI_OK) {
- log_error(debug_level, "failed registering long result: %s",
- nnti_err_str(rc));
- }
-
- /* fetch the data from the server */
- trios_start_timer(call_time);
- rc=NNTI_get(&header.result_addr,
- 0,
- result_size,
- &encoded_long_res_hdl,
- 0,
- &encoded_long_res_wr);
- trios_stop_timer("NNTI_get - long result", call_time);
- if (rc != NNTI_OK) {
- log_error(debug_level, "failed getting long result: %s",
- nnti_err_str(rc));
- }
- trios_start_timer(call_time);
- rc=NNTI_wait(&encoded_long_res_wr,
- -1,
- &status);
- trios_stop_timer("NNTI_wait - long result", call_time);
- if (rc != NNTI_OK) {
- log_error(debug_level, "failed waiting for the long result: %s",
- nnti_err_str(rc));
- }
- /* create a memory stream for XDR-decoding the result */
- xdrmem_create(&res_xdrs, NNTI_BUFFER_C_POINTER(&encoded_long_res_hdl),
- NNTI_BUFFER_SIZE(&encoded_long_res_hdl), XDR_DECODE);
-
- log_debug(debug_level,"decoding the fetched result...");
- trios_start_timer(call_time);
- if (!xdr_decode_result(&res_xdrs, decoded_result)) {
- log_fatal(debug_level,"failed to decode the result");
- rc = NSSI_EDECODE;
- goto cleanup;
- }
- trios_stop_timer("xdr_decode_result - decode", call_time);
-
- trios_start_timer(call_time);
- rc=NNTI_alloc(
- &transports[request->svc->transport_id],
- sizeof(int8_t),
- 1,
- NNTI_SEND_SRC,
- &long_res_ack_hdl);
- trios_stop_timer("NNTI_register_memory - long result ack", call_time);
- if (rc != NNTI_OK) {
- log_error(debug_level, "failed registering long result ack: %s",
- nnti_err_str(rc));
- }
-
- trios_start_timer(call_time);
- rc=NNTI_send(
- &request->svc->svc_host,
- &long_res_ack_hdl,
- &header.result_ack_addr,
- &long_res_ack_wr);
- trios_stop_timer("NNTI_send - long result ack", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed sending short result: %s",
- nnti_err_str(rc));
- }
- trios_start_timer(call_time);
- rc=NNTI_wait(
- &long_res_ack_wr,
- -1,
- &long_res_ack_status);
- trios_stop_timer("NNTI_wait - long result ack", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed waiting for short result: %s",
- nnti_err_str(rc));
- }
- }
- }
-
- request->status = NSSI_REQUEST_COMPLETE;
-
-cleanup:
- if (header.fetch_result) {
- NNTI_free(&encoded_long_res_hdl);
- if (rc != NNTI_OK) {
- log_error(debug_level, "failed unregistering long result: %s",
- nnti_err_str(rc));
- }
-
- NNTI_free(&long_res_ack_hdl);
- if (rc != NNTI_OK) {
- log_error(debug_level, "failed unregistering long result ack: %s",
- nnti_err_str(rc));
- }
- }
-
- /* clean up portals data structures */
- log_debug(debug_level,"clean up data structures");
- cleanup(request);
-
- log_debug(debug_level,"end");
-
- return rc;
-}
-
-
-/**
- * @brief Initialize an RPC client and return the
- * service provided by the server. */
-int nssi_rpc_clnt_init(
- const nssi_rpc_transport rpc_transport,
- const char *my_url,
- const char *svc_url,
- nssi_service *result)
-{
- int rc = NSSI_OK;
- int default_timeout = 1000;
-
- /* initialize RPC */
- rc = nssi_rpc_init(rpc_transport, NSSI_DEFAULT_ENCODE, my_url);
- if (rc != NSSI_OK) {
- log_error(rpc_debug_level, "could not initialize RPC");
- return rc;
- }
-
- nssi_init(rpc_transport);
- if (rc != NSSI_OK) {
- log_error(rpc_debug_level, "could not initialize nssi client");
- return rc;
- }
-
- /* ping the server */
- return nssi_get_service(rpc_transport, svc_url, default_timeout, result);
-}
-
-/**
- * @brief Send a ping request to the server.
- */
-int nssi_get_services(
- const nssi_rpc_transport rpc_transport,
- const char **url,
- const int num_servers,
- const int timeout,
- nssi_service *result)
-{
- int rc = NSSI_OK;
- int i;
-
- for (i=0; isvc_host);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed disconnecting from service: %s",
- nnti_err_str(rc));
- }
- return(rc);
-}
-
-/* --------------- CLIENT INTERFACE --------- */
-
-/**
- * @brief Initialize the client.
- */
-int nssi_init(const nssi_rpc_transport transport_id)
-{
- int rc = NSSI_OK;
-
- client_init();
-
- client_initialized=true;
-
- return rc;
-}
-
-/**
- * @brief Complete a Nessie client.
- */
-int nssi_fini(const nssi_rpc_transport transport_id)
-{
- int rc = NSSI_OK;
-
- nthread_counter_fini(&request_count);
-
- client_initialized=false;
-
- return(rc);
-}
-
-/**
- * @brief Send a kill request to the server.
- */
-int nssi_kill(
- const nssi_service *svc,
- const int sig,
- const long timeout)
-{
- int rc = NSSI_OK;
- int rc2 = NSSI_OK;
- nssi_request req;
- log_level debug_level = rpc_debug_level;
- debug_level = rpc_debug_level;
-
- nssi_kill_service_args args;
-
- memset(&args, 0, sizeof(nssi_kill_service_args));
- args.sig = sig;
-
- client_init();
-
- /* send the request */
- rc = nssi_call_rpc(svc, NSSI_OP_KILL_SERVICE, &args, NULL, 0, NULL, &req);
- if (rc != NSSI_OK) {
- log_error(debug_level, "unable to call remote method: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- /* If we're forcing a kill, we don't want to wait for the response
- * from the server. This will likely cause some memory leaks. */
- if (sig != 0) {
- req.status = NSSI_REQUEST_COMPLETE;
- }
-
-
- /* wait for completion */
- log_debug(debug_level, "calling nssi_timedwait");
- //rc2 = nssi_timedwait(&req, timeout, &rc);
- rc2 = nssi_wait(&req, &rc);
- if (rc2 != NSSI_OK) {
- log_error(rpc_debug_level, "failed waiting for request %lu: %s",
- req.id,
- nssi_err_str(rc2));
-
- /* In this case, we failed waiting for the request because
- the service exited before it had a chance to send
- the result. */
- /*return rc2;*/
- }
-
-
-
- if (rc != NSSI_OK) {
- log_error(rpc_debug_level, "remote method failed: %s",
- nssi_err_str(rc));
-
- /* this case is a legitimate error */
- return rc;
- }
-
- log_debug(debug_level, "Finished with nssi_kill");
-
- return rc;
-}
-
-
-/**
- * @brief Reset tracing on a server.
- */
-int nssi_trace_reset(
- const nssi_service *svc,
- const char *fname,
- const int ftype,
- const char *enable,
- const long timeout)
-{
- int rc = NSSI_OK;
- int rc2 = NSSI_OK;
- nssi_request req;
- static const char *empty="";
-
- nssi_trace_reset_args args;
-
- client_init();
-
- memset(&args, 0, sizeof(nssi_trace_reset_args));
-
- /* initialize the args */
- args.fname = (char *)fname;
- args.ftype = ftype;
- args.enable = (char *)enable;
-
- log_debug(rpc_debug_level, "Calling nssi_trace_reset(%s, %d, %s)\n",
- fname, ftype, enable);
-
- if (!args.fname)
- args.fname = (char *)empty;
-
- if (!args.enable)
- args.enable = (char *)empty;
-
- /* send the request */
- rc = nssi_call_rpc(svc, NSSI_OP_TRACE_RESET, &args, NULL, 0, NULL, &req);
- if (rc != NSSI_OK) {
- log_error(rpc_debug_level, "unable to call remote method: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- /* wait for completion */
- log_debug(rpc_debug_level, "calling nssi_timedwait");
- rc2 = nssi_timedwait(&req, timeout, &rc);
- if (rc2 != NSSI_OK) {
- log_error(rpc_debug_level, "failed waiting for request %lu: %s",
- req.id,
- nssi_err_str(rc2));
- return rc2;
- }
-
- if (rc != NSSI_OK) {
- log_error(rpc_debug_level, "remote method failed: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- return rc;
-}
-
-/** @brief Test a request for completion
- *
- * @param req the handle of the pending request.
- * @return status of the operation.
- */
-int nssi_test(nssi_request *req, int *rc) {
- log_error(rpc_debug_level,"not supported");
- return (int)NSSI_ENOTSUP;
-}
-
-static int setup_short_request(nssi_request *request)
-{
- int rc = NSSI_OK;
- int short_request_len = 0;
-
- trios_declare_timer(call_time);
-
- if (nssi_config.use_buffer_queue) {
- request->short_request_hdl=trios_buffer_queue_pop(&send_bq);
- log_debug(rpc_debug_level, "Popped short request buffer");
- } else {
- /* allocate memory for the short request buffer */
- short_request_len = NNTI_BUFFER_SIZE(&request->svc->req_addr);
-
- trios_start_timer(call_time);
- rc=NNTI_alloc(
- &transports[request->svc->transport_id],
- short_request_len,
- 1,
- NNTI_SEND_SRC,
- request->short_request_hdl);
- trios_stop_timer("NNTI_register_memory - short request", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed registering short request: %s",
- nnti_err_str(rc));
- goto cleanup;
- }
- log_debug(rpc_debug_level, "Allocated short request buffer");
- }
-
-cleanup:
- return rc;
-}
-
-static int teardown_short_request(nssi_request *request)
-{
- int rc = NSSI_OK;
-
- trios_declare_timer(call_time);
-
- if (nssi_config.use_buffer_queue) {
- trios_buffer_queue_push(&send_bq, request->short_request_hdl);
- } else {
- trios_start_timer(call_time);
- rc=NNTI_free(request->short_request_hdl);
- trios_stop_timer("NNTI_unregister_memory - send req", call_time);
- }
- request->short_request_hdl=NULL;
-
- return rc;
-}
-
-static int setup_bulk_data(nssi_request *request)
-{
- int rc = NSSI_OK;
-
- trios_declare_timer(call_time);
-
- if ((nssi_config.use_buffer_queue) &&
- (nssi_config.rdma_buffer_queue_buffer_size >= request->data_size)) {
- log_debug(rpc_debug_level, "using buffer queue for TARGET buffer");
- request->bulk_data_hdl=trios_buffer_queue_pop(&rdma_target_bq);
- assert(request->bulk_data_hdl);
- NNTI_BUFFER_SIZE(request->bulk_data_hdl)=request->data_size;
- /* copy the user buffer contents into RDMA buffer */
- trios_start_timer(call_time);
- memcpy(NNTI_BUFFER_C_POINTER(request->bulk_data_hdl), (char *)request->data, request->data_size);
- trios_stop_timer("memcpy target buf to bq", call_time);
- } else {
- log_debug(rpc_debug_level, "using user buffer for TARGET buffer");
- log_debug (rpc_debug_level, "Registering data buffer (size=%d)", request->data_size);
-
- trios_start_timer(call_time);
- rc=NNTI_register_memory(
- &transports[request->svc->transport_id],
- (char *)request->data,
- request->data_size,
- 1,
- (NNTI_buf_ops_t)(NNTI_GET_SRC|NNTI_PUT_DST),
- request->bulk_data_hdl);
- trios_stop_timer("NNTI_register_memory - data", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed registering data: %s",
- nnti_err_str(rc));
- goto cleanup;
- }
- log_debug(rpc_debug_level, "Allocated bulk data buffer");
- }
-
- if (logging_debug(rpc_debug_level)) {
- fprint_NNTI_buffer(logger_get_file(), "request->bulk_data_hdl",
- "NNTI_buffer_t", request->bulk_data_hdl);
- }
-
-cleanup:
- return rc;
-}
-
-static int teardown_bulk_data(nssi_request *request)
-{
- int rc = NSSI_OK;
-
- if ((nssi_config.use_buffer_queue) &&
- (nssi_config.rdma_buffer_queue_buffer_size >= request->data_size)) {
- trios_buffer_queue_push(&rdma_target_bq, request->bulk_data_hdl);
- } else {
- rc=NNTI_unregister_memory(request->bulk_data_hdl);
- }
- request->bulk_data_hdl=NULL;
-
- return rc;
-}
-
-static int setup_short_result(nssi_request *request)
-{
- int rc = NSSI_OK;
-
- trios_declare_timer(call_time);
-
- if (nssi_config.use_buffer_queue) {
- request->short_result_hdl=trios_buffer_queue_pop(&recv_bq);
- } else {
- log_debug (rpc_debug_level, "allocating short result (size=%d)", NSSI_SHORT_RESULT_SIZE);
-
- trios_start_timer(call_time);
- rc=NNTI_alloc(
- &transports[request->svc->transport_id],
- NSSI_SHORT_RESULT_SIZE,
- 1,
- NNTI_RECV_DST,
- request->short_result_hdl);
- trios_stop_timer("NNTI_register_memory - short result", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed registering short result: %s",
- nnti_err_str(rc));
- goto cleanup;
- }
- log_debug(rpc_debug_level, "Allocated short result buffer");
- }
-
-cleanup:
- return rc;
-}
-
-static int teardown_short_result(nssi_request *request)
-{
- int rc = NSSI_OK;
-
- if (nssi_config.use_buffer_queue) {
- trios_buffer_queue_push(&recv_bq, request->short_result_hdl);
- } else {
- rc=NNTI_free(request->short_result_hdl);
- }
- request->short_result_hdl=NULL;
-
- return rc;
-}
-
-static int setup_long_args(nssi_request *request, nssi_size args_size)
-{
- int rc = NSSI_OK;
-
- log_debug(rpc_debug_level,"allocating space for args");
- /* allocate memory for the encoded arguments. The request
- * structure keeps track of the buffer so it can free
- * the memory later. */
- rc=NNTI_alloc(
- &transports[request->svc->transport_id],
- args_size,
- 1,
- NNTI_GET_SRC,
- request->long_args_hdl);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed registering long args: %s",
- nnti_err_str(rc));
- goto cleanup;
- }
-
-cleanup:
- return rc;
-}
-
-static int teardown_long_args(nssi_request *req)
-{
- int rc = NSSI_OK;
- char *buf;
-
- trios_declare_timer(call_time);
-
- if (!req->use_long_args) {
- return(rc);
- }
-
- log_debug(rpc_debug_level, "waiting for long args");
-
- if (req->app_pinned_long_args == FALSE) {
- rc=NNTI_free(req->long_args_hdl);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed unregistering long args: %s",
- nnti_err_str(rc));
- }
- }
-
- return rc;
-}
-
-/**
- * @brief Wait for a request to complete.
- *
- * @param req the handle of the pending request.
- */
-int nssi_timedwait(nssi_request *req, int timeout, int *remote_rc)
-{
- int rc=NSSI_OK;
- log_level debug_level = rpc_debug_level;
- NNTI_status_t status;
-
- int retries=0;
-
- trios_declare_timer(total_time);
- trios_declare_timer(call_time);
-
- trios_start_timer(total_time);
-
- switch (req->status) {
-
- case NSSI_REQUEST_NULL:
-
- goto request_null;
-
- case NSSI_REQUEST_ERROR:
- log_debug(rpc_debug_level,"timedwait finished");
- *remote_rc = req->error_code;
-
- goto request_error;
-
- case NSSI_REQUEST_COMPLETE:
- log_debug(rpc_debug_level,"timedwait finished");
- *remote_rc = NSSI_OK;
-
- goto request_complete;
-
- default:
- log_debug(debug_level, "calling NNTI_wait for request");
- /* Times out after DEFAULT_RPC_TIMEOUT */
- trios_start_timer(call_time);
- rc=NNTI_wait(
- &req->short_request_wr,
- timeout,
- &status);
- trios_stop_timer("NNTI_wait - send req", call_time);
- if (status.result == NNTI_EDROPPED) {
- log_debug(LOG_ALL, "request dropped");
- }
- while (status.result == NNTI_EDROPPED) {
- if (retries++ < MAX_RETRIES) {
- trios_start_timer(call_time);
- rc=NNTI_send(
- &req->svc->svc_host,
- req->short_request_hdl,
- &req->svc->req_addr,
- &req->short_request_wr);
- trios_stop_timer("NNTI_send - resend req", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed resending short request: %s",
- nnti_err_str(rc));
- break;
- }
- trios_start_timer(call_time);
- rc=NNTI_wait(
- &req->short_request_wr,
- timeout,
- &status);
- trios_stop_timer("NNTI_wait - resend req", call_time);
- if (status.result == NNTI_EDROPPED) {
- log_debug(LOG_ALL, "request dropped");
- }
- } else {
- log_error(rpc_debug_level, "retries exhausted: %s",
- nnti_err_str(rc));
- break;
- }
- }
- if (rc == NNTI_ETIMEDOUT) {
- log_info(rpc_debug_level, "send request timed out");
-
- goto wait_timedout;
- }
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed waiting for send: %s",
- nnti_err_str(rc));
-
- goto wait_failed;
- }
-
- /* the service is processing the request. */
- req->status = NSSI_PROCESSING_REQUEST;
-
- log_debug(debug_level, "calling NNTI_wait for result");
- trios_start_timer(call_time);
- NNTI_create_work_request(
- req->short_result_hdl,
- &req->short_result_wr);
- rc=NNTI_wait(
- &req->short_result_wr,
- timeout,
- &status);
- trios_stop_timer("NNTI_wait - short result", call_time);
- if (status.result == NNTI_ETIMEDOUT) {
- log_info(debug_level, "NNTI_wait for result timed out");
- rc = status.result;
-
- goto wait_timedout;
- }
- if (status.result != NNTI_OK) {
- log_info(debug_level, "NNTI_wait for result failed");
- rc = status.result;
- req->status = NSSI_REQUEST_ERROR;
-
- goto wait_failed;
- }
-
- log_debug(debug_level, "Processing result status.offset=%d", status.offset);
-
- /* we are now ready to process the result */
- req->status = NSSI_PROCESSING_RESULT;
-
- rc = process_result((char *)status.start+status.offset, req);
- if (rc != NSSI_OK) {
- log_fatal(debug_level,"unable to process result");
- fprint_NNTI_status(logger_get_file(), "status", "FATAL", &status);
-
- goto wait_failed;
- }
-
- NNTI_destroy_work_request(
- &req->short_result_wr);
-
- goto wait_success;
- }
-
-
-
-
-request_null:
- return rc;
-
-request_error:
- return rc;
-
-request_bad_status:
- /* this should only execute if something went wrong */
- log_fatal(debug_level,"invalid request status %d",req->status);
- return NSSI_EBADRPC;
-
-request_complete:
- if (req->is_responseless == TRUE) {
- return rc;
- }
- goto buffer_cleanup;
-
-wait_timedout:
- return rc;
-
-wait_failed:
- /* check for an error */
- *remote_rc = req->error_code;
- return rc;
-
-wait_success:
- /* call the callback function associated with the request */
- log_debug(debug_level, "calling callback for wait(): op=%d", req->opcode);
- if (req->callback) {
- req->callback(req);
- }
-
- /* check for completion */
- log_debug(debug_level,"timedwait finished");
- *remote_rc = NSSI_OK;
- goto buffer_cleanup;
-
-buffer_cleanup:
- if (req->app_pinned_short_request == FALSE) {
- log_debug(debug_level, "Cleanup short request");
- rc = teardown_short_request(req);
- if (rc != NSSI_OK) {
- log_error(debug_level, "failed to cleanup long args");
- }
- }
-
- if (req->app_pinned_short_result == FALSE) {
- log_debug(debug_level, "Cleanup short result");
- rc = teardown_short_result(req);
- if (rc != NSSI_OK) {
- log_error(debug_level, "failed to cleanup long args");
- }
- }
-
- if (req->use_long_args) {
- log_debug(debug_level, "Cleanup long args");
- /* Now we need to clean up the long arguments (if they were used) */
- rc = teardown_long_args(req);
- if (rc != NSSI_OK) {
- log_error(debug_level, "failed to cleanup long args");
- }
- }
-
- /* If the request has data associated with it, the data should
- * be transferred by now (server would not have sent result).
- * We need to unlink the MD and free the event queue.
- */
- if (req->data != NULL) {
- if (req->app_pinned_bulk_data == FALSE) {
- if ((nssi_config.use_buffer_queue) &&
- (nssi_config.rdma_buffer_queue_buffer_size >= req->data_size)) {
- /* copy the RDMA buffer contents into the user buffer.
- * we can't tell if the server op was get or put.
- * if it was get, then this is a waste of time.
- * if it was put, then this is required.
- */
- trios_start_timer(call_time);
- memcpy(req->data, NNTI_BUFFER_C_POINTER(req->bulk_data_hdl), req->data_size);
- trios_stop_timer("memcpy bq to target buf", call_time);
- }
- log_debug(debug_level, "Cleanup bulk data");
- teardown_bulk_data(req);
- }
- }
-
- trios_stop_timer("nssi_timedwait - total", total_time);
-
- return rc;
-}
-
-int nssi_wait(nssi_request *req, int *rc)
-{
- log_debug(rpc_debug_level, "calling nssi_timedwait(timeout=-1)");
- return nssi_timedwait(req, -1, rc);
-}
-
-/**
- * @brief Wait for any request to complete.
- *
- * A request is not complete unless we receive the short
- * result.
- *
- * @param req_array @input_type The array of pending requests.
- * @param size @input_type The number of pending requests.
- * @param timeout @input_type The time to wait for any one request.
- *
- */
-int nssi_waitany(
- nssi_request *req_array,
- nssi_size req_count,
- int timeout,
- int *which,
- int *remote_rc)
-{
- NNTI_result_t nnti_rc=NNTI_OK; /* result of NNTI functions */
-
- int rc = NSSI_OK; /* return code */
- int rc2;
- int i;
-
- int errors =0;
- int timeouts=0;
-
- NNTI_work_request_t **work_requests=new NNTI_work_request_t*[req_count];
- uint32_t nnti_which=0;
- NNTI_status_t status;
-
- log_level debug_level = rpc_debug_level;
-
- int retries=0;
-
- trios_declare_timer(call_time);
-
-
- for (i=0;isvc_host,
- req_array[*which].short_request_hdl,
- &req_array[*which].svc->req_addr,
- &req_array[*which].short_request_wr);
- trios_stop_timer("NNTI_send - resend req", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed resending short request: %s",
- nnti_err_str(rc));
- req_array[*which].status = NSSI_REQUEST_ERROR;
- } else {
- goto wait_again;
- }
- } else {
- log_error(rpc_debug_level, "retries exhausted: %s",
- nnti_err_str(rc));
- }
- }
- if (status.result == NNTI_ETIMEDOUT) {
- log_info(debug_level, "NNTI_wait for result timed out");
- rc = status.result;
- return rc;
- }
- if (status.result != NNTI_OK) {
- log_info(debug_level, "NNTI_wait for result failed");
- rc = status.result;
- req_array[*which].status = NSSI_REQUEST_ERROR;
- work_requests[*which]=NULL;
- }
-
- if (req_array[*which].status == NSSI_SENDING_REQUEST) {
- /* the send is complete. now wait for the result. */
- req_array[*which].status = NSSI_PROCESSING_REQUEST;
-
- nnti_rc = NNTI_create_work_request(
- req_array[*which].short_result_hdl,
- &req_array[*which].short_result_wr);
- work_requests[*which]=&req_array[*which].short_result_wr;
-
- goto wait_again;
- }
-
- log_debug(debug_level, "Processing result status.offset=%d", status.offset);
-
- /* we are now ready to process the result */
- req_array[*which].status = NSSI_PROCESSING_RESULT;
- rc = process_result((char *)status.start+status.offset, &req_array[*which]);
- if (rc != NSSI_OK) {
- log_fatal(debug_level,"unable to process result");
- fprint_NNTI_status(logger_get_file(), "status", "FATAL", &status);
- return rc;
- }
-
- if (req_array[*which].use_long_args) {
- log_debug(debug_level, "Cleanup long args");
- /* Now we need to clean up the long arguments (if they were used) */
- rc = teardown_long_args(&req_array[*which]);
- if (rc != NSSI_OK) {
- log_error(debug_level, "failed to cleanup long args");
- return NSSI_EBADRPC;
- }
- }
-
-cleanup:
-
- for (i=0;i= req_array[*which].data_size)) {
- /* copy the RDMA buffer contents into the user buffer.
- * we can't tell if the server op was get or put.
- * if it was get, then this is a waste of time.
- * if it was put, then this is required.
- */
- trios_start_timer(call_time);
- memcpy(req_array[*which].data, NNTI_BUFFER_C_POINTER(req_array[*which].bulk_data_hdl), req_array[*which].data_size);
- trios_stop_timer("memcpy bq to target buf", call_time);
- }
- teardown_bulk_data(&req_array[*which]);
- }
- }
-
-
- /* check for an error */
- if (req_array[*which].status == NSSI_REQUEST_ERROR) {
- *remote_rc = req_array[*which].error_code;
- return rc;
- }
-
- /* check for completion */
- if (req_array[*which].status == NSSI_REQUEST_COMPLETE) {
- log_debug(debug_level,"timedwait finished");
- *remote_rc = NSSI_OK;
- return rc;
- }
-
- /* this should only execute if something went wrong */
- log_fatal(debug_level,"invalid request status %d",req_array[*which].status);
- return NSSI_EBADRPC;
-
-}
-
-/**
- * @brief Wait for all requests to complete.
- *
- * A request is not complete unless we receive the short
- * result.
- *
- * @param req_array @input_type The array of pending requests.
- * @param size @input_type The number of pending requests.
- * @param timeout @input_type The time to wait for any one request.
- *
- */
-int nssi_waitall(
- nssi_request *req_array,
- nssi_size req_count,
- int timeout)
-{
- NNTI_result_t nnti_rc=NNTI_OK; /* result of NNTI functions */
-
- int rc = NSSI_OK; /* return code */
- int rc2;
- int i;
-
- int errors =0;
- int timeouts=0;
-
- NNTI_work_request_t **work_requests=new NNTI_work_request_t*[req_count];
- NNTI_status_t status;
-
- uint32_t which=0;
-
- log_level debug_level = rpc_debug_level;
-
- int retries=0;
-
- trios_declare_timer(call_time);
-
-
- for (i=0;isvc_host,
- req_array[which].short_request_hdl,
- &req_array[which].svc->req_addr,
- &req_array[which].short_request_wr);
- trios_stop_timer("NNTI_send - resend req", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed resending short request: %s",
- nnti_err_str(rc));
- break;
- }
- trios_start_timer(call_time);
- goto wait_again;
- } else {
- log_error(rpc_debug_level, "retries exhausted: %s",
- nnti_err_str(rc));
- }
- }
- if (status.result == NNTI_ETIMEDOUT) {
- log_info(debug_level, "work_request[%d] timed out", which);
- req_array[which].status = NSSI_REQUEST_TIMEDOUT;
- timeouts++;
- continue;
- }
- if (status.result != NNTI_OK) {
- log_info(debug_level, "work_request[%d] failed", which);
- req_array[which].status = NSSI_REQUEST_ERROR;
- errors++;
- goto wr_error;
- }
-
- if (req_array[which].status == NSSI_SENDING_REQUEST) {
- /* the send is complete. now wait for the result. */
- req_array[which].status = NSSI_PROCESSING_REQUEST;
-
- nnti_rc = NNTI_create_work_request(
- req_array[which].short_result_hdl,
- &req_array[which].short_result_wr);
- work_requests[which]=&req_array[which].short_result_wr;
-
- goto wait_again;
- }
-
- log_debug(debug_level, "Processing result status.offset=%d", status.offset);
-
- /* we are now ready to process the result */
- req_array[which].status = NSSI_PROCESSING_RESULT;
- rc = process_result((char *)status.start+status.offset, &req_array[which]);
- if (rc != NSSI_OK) {
- log_fatal(debug_level,"unable to process result");
- fprint_NNTI_status(logger_get_file(), "status", "FATAL", &status);
- req_array[which].status = NSSI_REQUEST_ERROR;
- errors++;
- }
-
- if (req_array[which].use_long_args) {
- log_debug(debug_level, "Cleanup long args");
- /* Now we need to clean up the long arguments (if they were used) */
- rc = teardown_long_args(&req_array[which]);
- if (rc != NSSI_OK) {
- log_error(debug_level, "failed to cleanup long args");
- req_array[which].status = NSSI_REQUEST_ERROR;
- errors++;
- }
- }
-
- NNTI_destroy_work_request(work_requests[which]);
-
- /* call the callback function associated with the request */
- log_debug(debug_level, "calling req_array[%d] callback: op=%d", which, req_array[which].opcode);
- if (req_array[which].callback) {
- req_array[which].callback(&req_array[which]);
- }
-
- if (req_array[which].app_pinned_short_result == FALSE) {
- teardown_short_result(&req_array[which]);
- }
-
- /* If the request has data associated with it, the data should
- * be transferred by now (server would not have sent result).
- * We need to unlink the MD and free the event queue.
- */
- if (req_array[which].data != NULL) {
- if (req_array[which].app_pinned_bulk_data == FALSE) {
- if ((nssi_config.use_buffer_queue) &&
- (nssi_config.rdma_buffer_queue_buffer_size >= req_array[which].data_size)) {
- /* copy the RDMA buffer contents into the user buffer.
- * we can't tell if the server op was get or put.
- * if it was get, then this is a waste of time.
- * if it was put, then this is required.
- */
- trios_start_timer(call_time);
- memcpy(req_array[which].data, NNTI_BUFFER_C_POINTER(req_array[which].bulk_data_hdl), req_array[which].data_size);
- trios_stop_timer("memcpy bq to target buf", call_time);
- }
- teardown_bulk_data(&req_array[which]);
- }
- }
-
-wr_error:
- work_requests[which] = NULL;
- }
-
- delete(work_requests);
-
- if (errors > 0) {
- return NSSI_EBADRPC;
- }
-
- if (timeouts > 0) {
- return NSSI_ETIMEDOUT;
- }
-
- return rc;
-}
-
-/**
- * @brief Initialize portals data structures associated with an
- * RPC request.
- *
- * @ingroup rpc_ptl_impl
- *
- * This method checks to see if the operation arguments for a
- * request arguments fit into the short request buffer (along
- * with the request header). If not, this method creates the necessary
- * portals data structures on the client that enable the server to
- * fetch the arguments explicitely.
- *
- */
-static int encode_args(
- const nssi_service *svc,
- void *args,
- NNTI_buffer_t *short_req_hdl,
- nssi_request_header *header,
- nssi_request *request)
-{
-
- int rc = NSSI_OK; /* return code */
-
- trios_declare_timer(call_time);
-
- /* xdrs for the header and the args. */
- XDR hdr_xdrs, args_xdrs;
-
- nssi_size hdr_size = 0;
- nssi_size args_size = 0;
- nssi_size data_size = 0;
- nssi_size data_offset = 0;
- nssi_size remaining = 0;
-
- char *buf=NULL;
-
-
- if (logging_debug(rpc_debug_level)) {
- fprint_nssi_service(logger_get_file(), "service", "DEBUG", svc);
- }
- /* get the encoding functions for the request */
- switch (svc->rpc_encode) {
- case NSSI_RPC_XDR:
- rc = nssi_lookup_xdr_encoding(request->opcode,
- &request->xdr_encode_args,
- &request->xdr_encode_data,
- &request->xdr_decode_result);
- if (rc != NSSI_OK) {
- log_error(rpc_debug_level,
- "could not find xdr encoding functions");
- goto cleanup;
- }
- break;
-
- default:
- log_error(rpc_debug_level, "invalid encoding scheme");
- rc = NSSI_EENCODE;
- goto cleanup;
- }
-
- /* set the request ID for the header */
- header->id = request->id;
-
-
- /* the size of the encoded header */
- hdr_size = xdr_sizeof((xdrproc_t)&xdr_nssi_request_header, header);
-
- if (args == NULL) {
- /* there are no args */
- header->fetch_args = FALSE;
- args_size = 0;
- } else {
- /* the size of the encoded args */
- args_size = xdr_sizeof(request->xdr_encode_args, args);
- /* what's left after encoding the header */
- remaining = NNTI_BUFFER_SIZE(short_req_hdl) - hdr_size;
- if (remaining > args_size) {
- /* args will fit in the request. fetch not required. */
- header->fetch_args = FALSE;
- } else {
- /* args will not fit in the request. server must fetch. */
- header->fetch_args = TRUE;
-
- if (request->is_responseless == TRUE) {
- log_debug(rpc_debug_level, "illegal combination: responseless + long args");
- return NSSI_EINVAL;
- }
- }
- }
-
- log_debug(rpc_debug_level, "initial hdr_size=%d", hdr_size);
-
- /**
- * If the arguments are too large to fit in an
- * \ref short request buffer, the client stores
- * excess arguments and waits for the server to
- * "fetch" the arguments using the \ref nssi_get_data method.
- */
- if (header->fetch_args == TRUE) {
-
- log_debug(rpc_debug_level,"putting args (len=%d) "
- "in long request", args_size);
-
- request->use_long_args=1;
-
- /* the app may provide its own registered long args buffer. check here. */
- if (request->app_pinned_long_args == FALSE) {
- setup_long_args(request, args_size);
- }
- header->args_addr=*request->long_args_hdl;
-
- /* create an xdr memory stream for the encoded args */
- xdrmem_create(&args_xdrs, NNTI_BUFFER_C_POINTER(request->long_args_hdl),
- NNTI_BUFFER_SIZE(request->long_args_hdl), XDR_ENCODE);
-
- /* if we get here, args should not be NULL */
- assert(args);
-
- /* encode the args */
- log_debug(rpc_debug_level,"encoding args");
- trios_start_timer(call_time);
- if (! request->xdr_encode_args(&args_xdrs, args)) {
- log_fatal(rpc_debug_level,"failed to encode the args");
- return NSSI_EENCODE;
- }
- trios_stop_timer("xdr_encode_args - encode", call_time);
-
- } else if ((header->fetch_args == FALSE) && (args != NULL)) {
-
- log_debug(rpc_debug_level,"putting args (len=%d) "
- "in short request", args_size);
-
- request->use_long_args=0;
-
- /* create an xdr memory stream inside the short request for the encoded args */
- xdrmem_create(&args_xdrs, NNTI_BUFFER_C_POINTER(short_req_hdl) + hdr_size,
- NNTI_BUFFER_SIZE(short_req_hdl) - hdr_size, XDR_ENCODE);
-
- /* if we get here, args should not be NULL */
- assert(args);
-
- /* encode the args */
- log_debug(rpc_debug_level,"encoding args");
- trios_start_timer(call_time);
- if (! request->xdr_encode_args(&args_xdrs, args)) {
- log_fatal(rpc_debug_level,"failed to encode the args");
- return NSSI_EENCODE;
- }
- trios_stop_timer("xdr_encode_args - encode", call_time);
-
- }
-
- /* if the args are being fetched, then the header has changed.
- * recalculate the size of the encoded header. */
- if (header->fetch_args == TRUE) {
- hdr_size = xdr_sizeof((xdrproc_t)&xdr_nssi_request_header, header);
- log_debug(rpc_debug_level, "using long args. recalculated hdr_size=%d", hdr_size);
- }
-
- if (nssi_config.put_data_in_request == FALSE) {
- header->fetch_data = TRUE;
- } else {
- /* the size of the bulk data buffer */
- data_size=NNTI_BUFFER_SIZE(&header->data_addr);
- if (data_size > 0) {
- /* what's left after encoding the header into the short request */
- remaining = NNTI_BUFFER_SIZE(short_req_hdl) - hdr_size;
- data_offset = hdr_size;
- if (header->fetch_args == FALSE) {
- /* the args are in the short request. reduce the remaining space by the size of the encoded args. */
- remaining -= args_size;
- data_offset += args_size;
- }
- if (remaining > data_size) {
- /* data will fit in the request. fetch not required. */
- header->fetch_data = FALSE;
- } else {
- /* data will not fit in the request. server must fetch. */
- header->fetch_data = TRUE;
- }
- } else {
- /* there is no data */
- header->fetch_data = FALSE;
- }
-
- if ((data_size > 0) && (header->fetch_data == FALSE)) {
- log_debug(rpc_debug_level,"putting data (size=%d, offset=%d) in short request", data_size, data_offset);
- /* copy small data into the short request */
- memcpy(NNTI_BUFFER_C_POINTER(short_req_hdl)+data_offset, NNTI_BUFFER_C_POINTER(&header->data_addr), data_size);
- }
- }
-
-
- /*
- * encode the header
- */
- log_debug(rpc_debug_level,"encoding request header");
-
- /* create an xdr memory stream for the short request buffer */
- xdrmem_create(&hdr_xdrs, NNTI_BUFFER_C_POINTER(short_req_hdl),
- NNTI_BUFFER_SIZE(short_req_hdl), XDR_ENCODE);
-
- trios_start_timer(call_time);
- if (! xdr_nssi_request_header(&hdr_xdrs, header)) {
- log_fatal(rpc_debug_level,"failed to encode the request header");
- return NSSI_EENCODE;
- }
- trios_stop_timer("xdr_nssi_request_header - encode", call_time);
-
-
- log_debug(rpc_debug_level, "short_req_size=%d, "
- "hdr_size(final)=%d, args_size=%d, data_size=%d",
- NNTI_BUFFER_SIZE(short_req_hdl), hdr_size, args_size, data_size);
-
- /* print the header for debugging */
- if (logging_debug(rpc_debug_level)) {
- fprint_nssi_request_header(logger_get_file(), "header",
- "nssi_request_header", header);
- }
-
-cleanup:
-
- /* done! */
- return rc;
-}
-
-
-/**
- * @brief Setup an RPC request.
- *
- * @ingroup rpc_ptl_impl
- *
- * This method populates an RPC request. All input parameters are copied
- * into the request. The request can be used to send the RPC to the service
- * and wait for the result
- *
- * @param svc @input descriptor for the NSSI service.
- * @param opcode @input descriptor for the remote method.
- * @param args @input pointer to the arguments.
- * @param data @input pointer to data (for bulk data transfers).
- * @param data_size @input length of data buffer
- * @param result @input where to put results.
- * @param request @output The request handle (used to test for
- * completion).
- */
-int nssi_create_request(
- const nssi_service *svc,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_size,
- void *result,
- nssi_request *request)
-{
- /* local count does not need protection */
- static int64_t local_count;
-
- /* local variables */
- int rc=NSSI_OK; /* return code */
-
- log_level debug_level = rpc_debug_level;
-
- char *buf;
-
- int retries=0;
-
- trios_declare_timer(total_time);
-
- unsigned long len=0;
-
- trios_start_timer(total_time);
-
- log_debug(rpc_debug_level, "enter");
-
- /* increment global counter */
- local_count = nthread_counter_increment(&request_count);
- if (local_count == -1) {
- log_error(debug_level, "Unable to increment counter");
- goto cleanup;
- }
-
- /*------ Initialize variables and buffers ------*/
- memset(request, 0, sizeof(nssi_request));
-
- /* set request fields */
- request->svc = svc;
- request->id = local_count; /* id of the request (used for debugging) */
- request->opcode = opcode; /* operation ID */
- request->is_responseless = FALSE;
- request->is_sync = FALSE;
- request->sync_timeout = -1;
- request->error_code = NSSI_OK; /* return code of remote method */
- request->status = NSSI_SENDING_REQUEST; /* status of this request */
- request->app_pinned_short_request = FALSE;
- request->short_request_hdl = &request->short_request;
- request->app_pinned_long_args = FALSE;
- request->long_args_hdl = &request->long_args;
- request->args = args; /* where to find the RPC args */
- request->app_pinned_bulk_data = FALSE;
- request->bulk_data_hdl = &request->bulk_data;
- request->data_size = data_size;
- request->data = (data_size > 0) ? data : NULL;
- request->app_pinned_short_result = FALSE;
- request->short_result_hdl = &request->short_result;
- request->result = result; /* where to put the result */
-
-cleanup:
- trios_stop_timer("nssi_create_request - total", total_time);
- log_debug(rpc_debug_level, "exit");
-
- return rc;
-}
-
-/**
- * @brief Send an RPC request to an NSSI server.
- *
- * @ingroup rpc_ptl_impl
- *
- * This method encodes and transfers an RPC request header and
- * operation arguments to an NSSI server using NNTI. If the
- * arguments are sufficiently small, \b nssi_send_request sends
- * the request header and the arguments in a single message.
- * If the arguments are large (i.e., too large for the request buffer),
- * the server fetches the arguments from a client-side buffer.
- *
- * @param request @inout The request handle (used to test for completion).
- */
-int nssi_send_request(
- nssi_request *request)
-{
- /* local variables */
- int rc=NSSI_OK; /* return code */
-
- NNTI_status_t status;
-
- log_level debug_level = rpc_debug_level;
-
- nssi_request_header header; /* the request header */
- char *buf;
-
- trios_declare_timer(total_time);
- trios_declare_timer(call_time);
-
- unsigned long len=0;
-
- trios_start_timer(total_time);
-
- log_debug(rpc_debug_level, "enter");
-
- if (request->is_responseless == TRUE) {
- /* quick check for illegal request setup */
- if (request->app_pinned_short_result == TRUE) {
- log_debug(rpc_debug_level, "illegal combination: responseless + app pinned short result");
- return NSSI_EINVAL;
- }
- if ((request->app_pinned_short_result == FALSE) && (request->result)) {
- log_debug(rpc_debug_level, "illegal combination: responseless + short result NOT NULL");
- return NSSI_EINVAL;
- }
- if (request->data_size > 0) {
- log_debug(rpc_debug_level, "illegal combination: responseless + bulk data");
- return NSSI_EINVAL;
- }
- }
-
-
- /*------ Initialize variables and buffers ------*/
- memset(&header, 0, sizeof(nssi_request_header));
-
- /* set the opcode for the request header */
- header.opcode = request->opcode;
-
- /* the app may provide its own registered request buffer. check here. */
- if (request->app_pinned_short_request == FALSE) {
- /* the app didn't provide a registered request buffer. get one here. */
- setup_short_request(request);
- }
-
- if (request->data_size > 0) {
-
- /* the app may provide its own registered bulk data buffer. check here. */
- if (request->app_pinned_bulk_data == FALSE) {
- /* the app didn't provide a registered bulk data buffer. get one here. */
- setup_bulk_data(request);
- }
- header.data_addr=*request->bulk_data_hdl;
- }
-
- header.is_responseless = request->is_responseless;
- if (request->is_responseless == FALSE) {
- /* the app may provide its own registered result buffer. check here. */
- if (request->app_pinned_short_result == FALSE) {
- /* the app didn't provide a registered result buffer. get one here. */
- setup_short_result(request);
- }
- header.res_addr=*request->short_result_hdl;
- }
-
- /* --- encode the arguments (might place args in the short request) --- */
- trios_start_timer(call_time);
- rc = encode_args(request->svc, request->args, request->short_request_hdl, &header, request);
- trios_stop_timer("encode_args", call_time);
- if (rc != NSSI_OK) {
- log_fatal(rpc_debug_level, "unable to encode arguments");
- goto cleanup;
- }
-
- log_debug(LOG_OFF, "header.id=%d", header.id);
-
- /* get the number of valid bytes in the request */
- trios_start_timer(call_time);
- len = xdr_sizeof((xdrproc_t)&xdr_nssi_request_header, &header);
- trios_stop_timer("xdr_sizeof - request header", call_time);
-
- /* if the args in the short request, add args len */
- if (!header.fetch_args) {
- len += NNTI_BUFFER_SIZE(&header.args_addr);
- }
-
- /* send the encoded short request buffer to the server */
- log_debug(rpc_debug_level,"sending short request, id=%lu, len=%d", header.id, len);
-
- trios_start_timer(call_time);
- rc=NNTI_send(
- &request->svc->svc_host,
- request->short_request_hdl,
- &request->svc->req_addr,
- &request->short_request_wr);
- trios_stop_timer("NNTI_send - send req", call_time);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "failed sending short request: %s",
- nnti_err_str(rc));
- goto cleanup;
- }
- log_debug(rpc_debug_level,"message sent");
-
- if (request->is_responseless == TRUE) {
- trios_start_timer(call_time);
- rc=NNTI_wait(
- &request->short_request_wr,
- -1,
- &status);
- trios_stop_timer("NNTI_wait - send req", call_time);
- if (status.result == NNTI_EDROPPED) {
- log_debug(rpc_debug_level, "request dropped");
- }
- if (rc != NNTI_OK) {
- log_debug(rpc_debug_level, "failed waiting for send: %s",
- nnti_err_str(rc));
- goto cleanup;
- }
- }
-
- if (request->is_sync == TRUE) {
- int remote_rc=NSSI_OK;
- rc=nssi_timedwait(request, request->sync_timeout, &remote_rc);
- }
-
-cleanup:
- log_debug(rpc_debug_level, "finished nssi_send_request (req.opcode=%d, req.id=%d)",
- request->opcode, request->id);
-
- if (rc == NSSI_OK) {
- if (request->is_responseless == TRUE) {
- request->status = NSSI_REQUEST_COMPLETE;
- }
- } else {
- /* change the state of the pending request */
- request->status = NSSI_REQUEST_ERROR;
-
- if (request->app_pinned_short_request == FALSE) {
- teardown_short_request(request);
- }
-
- if (request->app_pinned_bulk_data == FALSE) {
- if (request->data_size > 0) {
- teardown_bulk_data(request);
- }
- }
- if (request->app_pinned_short_result == FALSE) {
- teardown_short_result(request);
- }
- }
-
- trios_stop_timer("nssi_send_request - total", total_time);
-
- return rc;
-}
-
-
-/**
- * @brief Setup and send an RPC request to an NSSI server.
- *
- * @ingroup rpc_ptl_impl
- *
- * This method populates, encodes and transfers an RPC request header and
- * operation arguments to an NSSI server using NNTI. If the
- * arguments are sufficiently small, \b nssi_call_rpc sends
- * the request header and the arguments in a single message.
- * If the arguments are large (i.e., too large for the request buffer),
- * the server fetches the arguments from a client-side buffer.
- *
- * @param svc @input descriptor for the NSSI service.
- * @param opcode @input descriptor for the remote method.
- * @param args @input pointer to the arguments.
- * @param data @input pointer to data (for bulk data transfers).
- * @param data_size @input length of data buffer
- * @param result @input where to put results.
- * @param request @output The request handle (used to test for
- * completion).
- */
-int nssi_call_rpc(
- const nssi_service *svc,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_size,
- void *result,
- nssi_request *request)
-{
- /* local variables */
- int rc=NSSI_OK; /* return code */
-
- log_level debug_level = rpc_debug_level;
-
- nssi_request_header header; /* the request header */
-
- int retries=0;
-
- trios_declare_timer(total_time);
- trios_declare_timer(call_time);
-
- unsigned long len=0;
-
- trios_start_timer(total_time);
-
- log_debug(rpc_debug_level, "enter");
-
- rc=nssi_create_request(svc, opcode, args, data, data_size, result, request);
- if (rc != NSSI_OK) {
- goto cleanup;
- }
- rc=nssi_send_request(request);
- if (rc != NSSI_OK) {
- goto cleanup;
- }
-
-cleanup:
-
- return rc;
-
-}
-
-
-/**
- * @brief Send an RPC request to an NSSI server.
- *
- * @ingroup rpc_ptl_impl
- *
- * This method encodes and transfers an RPC request header and
- * operation arguments to an NSSI server using Portals. If the
- * arguments are sufficiently small, \b nssi_call_rpc sends
- * the request header and the arguments in a single message.
- * If the arguments are large (i.e., too large for the request buffer),
- * the server to fetch the arguments from a client-side portal.
- *
- * @param rpc @input descriptor for the remote method.
- * @param args @input pointer to the arguments.
- * @param data @input pointer to data (for bulk data transfers).
- * @param data_size @input length of data buffer
- * @param result @input where to put results.
- * @param req @output The request handle (used to test for
- * completion).
- */
-
-int nssi_call_rpc_sync(
- const nssi_service *svc,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_size,
- void *result)
-{
- int rc = NSSI_OK;
- int rc2 = NSSI_OK;
- nssi_request req;
-
- rc = nssi_call_rpc(svc, opcode, args, data, data_size, result, &req);
- if (rc != NSSI_OK) {
- log_error(rpc_debug_level, "failed calling nssi_call_rpc: %s", nssi_err_str(rc));
- goto cleanup;
- }
-
- rc2 = nssi_wait(&req, &rc);
- if (rc2 != NSSI_OK) {
- log_error(rpc_debug_level, "failed waiting for result from server: %s", nssi_err_str(rc));
- rc = rc2;
- goto cleanup;
- }
-
- if (rc != NSSI_OK) {
- log_warn(rpc_debug_level, "error in remote method: %s",
- nssi_err_str(rc));
- return rc;
- }
-
-cleanup:
- return rc;
-}
-
-int nssi_multicast_rpc(
- const nssi_service *svcs,
- const nssi_size num_svcs,
- const int opcode,
- void *args,
- void *data,
- uint32_t data_size,
- void *results,
- nssi_size result_size, /* size in bytes of the result */
- nssi_request *requests)
-{
- nssi_size i=0;
- int rc=0;
-
- for (i=0;i reqs(num_svcs);
-
- rc = nssi_multicast_rpc(svcs, num_svcs, opcode, args, data, data_size, results, result_size, &reqs[0]);
- if (rc != NSSI_OK) {
- log_error(rpc_debug_level, "failed calling nssi_call_rpc: %s", nssi_err_str(rc));
- return rc;
- }
-
- rc2 = nssi_waitall(&reqs[0], num_svcs, -1);
- if (rc2 != NSSI_OK) {
- log_error(rpc_debug_level, "failed waiting for result from server: %s", nssi_err_str(rc));
- return rc2;
- }
-
- if (rc != NSSI_OK) {
- log_warn(rpc_debug_level, "error in remote method: %s",
- nssi_err_str(rc));
- return rc;
- }
-
- return rc;
-}
-
-int nssi_atomic_increment(
- const nssi_service *svc,
- const uint64_t remote_atomic,
- const uint64_t local_atomic)
-{
- int rc=NSSI_OK; /* return code */
-
- NNTI_work_request_t wr;
- NNTI_status_t status;
-
- rc=NNTI_atomic_fop(&transports[svc->transport_id],
- &svc->svc_host,
- remote_atomic,
- local_atomic,
- 1,
- NNTI_ATOMIC_FADD,
- &wr);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "remote method failed: %s",
- nnti_err_str(rc));
- return rc;
- }
- rc=NNTI_wait(&wr, -1, &status);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "remote method failed: %s",
- nnti_err_str(rc));
- return rc;
- }
-
- return(rc);
-}
-
-int nssi_atomic_decrement(
- const nssi_service *svc,
- const uint64_t remote_atomic,
- const uint64_t local_atomic)
-{
- int rc=NSSI_OK; /* return code */
-
- NNTI_work_request_t wr;
- NNTI_status_t status;
-
- rc=NNTI_atomic_fop(&transports[svc->transport_id],
- &svc->svc_host,
- remote_atomic,
- local_atomic,
- -1,
- NNTI_ATOMIC_FADD,
- &wr);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "remote method failed: %s",
- nnti_err_str(rc));
- return rc;
- }
- rc=NNTI_wait(&wr, -1, &status);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "remote method failed: %s",
- nnti_err_str(rc));
- return rc;
- }
-
- return(rc);
-}
-
-int nssi_atomic_read(
- const nssi_service *svc,
- const uint64_t local_atomic,
- int64_t *value)
-{
- int rc=NSSI_OK; /* return code */
-
- NNTI_work_request_t wr;
- NNTI_status_t status;
-
- rc=NNTI_atomic_read(
- &transports[svc->transport_id],
- local_atomic,
- value);
- if (rc != NNTI_OK) {
- log_error(rpc_debug_level, "atomic read failed: %s",
- nnti_err_str(rc));
- return rc;
- }
-
- return(rc);
-}
diff --git a/packages/trios/libraries/nessie/nnti/CMakeLists.txt b/packages/trios/libraries/nessie/nnti/CMakeLists.txt
deleted file mode 100644
index 036cb3ca425f..000000000000
--- a/packages/trios/libraries/nessie/nnti/CMakeLists.txt
+++ /dev/null
@@ -1,130 +0,0 @@
-
-# @HEADER
-# ************************************************************************
-#
-# Trios: Trilinos I/O Support
-# Copyright 2011 Sandia Corporation
-#
-# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-# the U.S. Government retains certain rights in this software.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. 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.
-#
-# 3. Neither the name of the Corporation nor the names of the
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-# 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.
-#
-# Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-#
-# *************************************************************************
-# @HEADER
-
-
-INCLUDE(TriosProcessXDR)
-
-SET(NNTI_HEADERS "")
-SET(NNTI_NONINSTALLHEADERS "")
-SET(NNTI_SOURCES "")
-
-
-############# COMMON ##########################
-
-TRIBITS_SUBPACKAGE(nnti)
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-
-############# NNTI ##########################
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=200112L")
-
-TriosProcessXDR(${CMAKE_CURRENT_SOURCE_DIR}/Trios_nnti_xdr.x)
-
-APPEND_SET(NNTI_NOINSTHEADERS
- nnti_gni.h
- nnti_ib.h
- nnti_dcmf.h
- nnti_mpi.h
- nnti_internal.h
- nnti_ptls.h
- nnti_utils.h
- buffer_queue.h
-)
-
-APPEND_SET(NNTI_HEADERS
- ${CMAKE_CURRENT_BINARY_DIR}/Trios_nnti_xdr.h
- Trios_nnti_fprint_types.h
- Trios_nnti.h
-)
-
-APPEND_SET(NNTI_SOURCES
- ${CMAKE_CURRENT_BINARY_DIR}/Trios_nnti_xdr.c
- fprint_types.cpp
- nnti.c
- nnti_utils.c
- buffer_queue.cpp
-)
-
-SET(TRIOS_SUPPORTED_NETWORK_FOUND 0)
-IF (${PACKAGE_NAME}_ENABLE_Portals OR ${PACKAGE_NAME}_ENABLE_CrayPortals)
- APPEND_SET(NNTI_SOURCES nnti_ptls.cpp)
- SET(TRIOS_SUPPORTED_NETWORK_FOUND 1)
-ENDIF ()
-IF (${PACKAGE_NAME}_ENABLE_InfiniBand)
- APPEND_SET(NNTI_SOURCES nnti_ib.cpp)
- SET(TRIOS_SUPPORTED_NETWORK_FOUND 1)
-ENDIF ()
-IF (${PACKAGE_NAME}_ENABLE_Gemini)
- APPEND_SET(NNTI_SOURCES nnti_gni.cpp)
- SET(TRIOS_SUPPORTED_NETWORK_FOUND 1)
-ENDIF ()
-IF (${PARENT_PACKAGE_NAME}_ENABLE_BGPDCMF)
- APPEND_SET(NNTI_SOURCES nnti_dcmf.cpp)
- SET(TRIOS_SUPPORTED_NETWORK_FOUND 1)
-ENDIF ()
-IF (${PARENT_PACKAGE_NAME}_ENABLE_BGQPAMI)
- APPEND_SET(NNTI_SOURCES nnti_pami.cpp)
- SET(TRIOS_SUPPORTED_NETWORK_FOUND 1)
-ENDIF ()
-IF (${PARENT_PACKAGE_NAME}_ENABLE_MPI)
- APPEND_SET(NNTI_SOURCES nnti_mpi.cpp)
- SET(TRIOS_SUPPORTED_NETWORK_FOUND 1)
-ENDIF ()
-IF (NOT TRIOS_SUPPORTED_NETWORK_FOUND)
- message(FATAL "Did not find a supported network protocol. ")
-ENDIF ()
-
-############# libtrios_nnti.a ##########################
-
-TRIBITS_ADD_LIBRARY(
- trios_nnti
- HEADERS ${NNTI_HEADERS}
- NOINSTALLHEADERS ${NNTI_NOINSTALLHEADERS}
- SOURCES ${NNTI_SOURCES}
- DEPLIBS ${DEPLIBS}
-)
-
-
-TRIBITS_SUBPACKAGE_POSTPROCESS()
diff --git a/packages/trios/libraries/nessie/nnti/Trios_nnti.h b/packages/trios/libraries/nessie/nnti/Trios_nnti.h
deleted file mode 100644
index fe1cc362f650..000000000000
--- a/packages/trios/libraries/nessie/nnti/Trios_nnti.h
+++ /dev/null
@@ -1,597 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/**
- * @file Trios_nnti.h
- *
- * @brief Trios_nnti.h
- *
- * @author Todd Kordenbrock (thkorde\@sandia.gov).
- * Created on: Jan 13, 2011
- */
-
-#ifndef NNTI_H_
-#define NNTI_H_
-
-
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @addtogroup nnti_impl
- * @{
- */
-
-typedef NNTI_result_t (*NNTI_callback_fn_t) (
- const NNTI_transport_t *trans_hdl,
- const uint64_t local_atomic,
- void *context);
-
-
-/**
- * @brief Initialize NNTI to use a specific transport.
- *
- * \param[in] trans_id The ID of the transport the client wants to use.
- * \param[in] my_url A string that describes the transport parameters.
- * \param[out] trans_hdl A handle to the configured transport.
- * \return A result code (NNTI_OK or an error)
- *
- */
-NNTI_result_t NNTI_init (
- const NNTI_transport_id_t trans_id,
- const char *my_url,
- NNTI_transport_t *trans_hdl);
-
-/**
- * @brief Return the URL field of this transport.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[out] url A string that describes this process in a transport specific way.
- * \param[in] maxlen The length of the 'url' string parameter.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_get_url (
- const NNTI_transport_t *trans_hdl,
- char *url,
- const uint64_t maxlen);
-
-/**
- * @brief Prepare for communication with the peer identified by url.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] url A string that describes a peer in a transport specific way.
- * \param[in] timeout The amount of time (in milliseconds) to wait before giving up.
- * \param[out] peer_hdl A handle to a peer that can be used for network operations.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_connect (
- const NNTI_transport_t *trans_hdl,
- const char *url,
- const int timeout,
- NNTI_peer_t *peer_hdl);
-
-/**
- * @brief Terminate communication with this peer.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] peer_hdl A handle to a peer.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_disconnect (
- const NNTI_transport_t *trans_hdl,
- NNTI_peer_t *peer_hdl);
-
-/**
- * @brief Allocate a block of memory and prepare it for network operations.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] size The size (in bytes) of 'buffer'.
- * \param[in] ops Allowable transport ops for 'buffer'.
- * \param[out] reg_buf A pointer to a NNTI_buffer_t.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_alloc (
- const NNTI_transport_t *trans_hdl,
- const uint64_t element_size,
- const uint64_t num_elements,
- const NNTI_buf_ops_t ops,
- NNTI_buffer_t *reg_buf);
-
-/**
- * @brief Cleanup after network operations are complete and release the block
- * of memory.
- *
- * \param[in] reg_buf The buffer to cleanup.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_free (
- NNTI_buffer_t *reg_buf);
-
-/**
- * @brief Prepare a block of memory for network operations.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] buffer Pointer to a memory block.
- * \param[in] size The size (in bytes) of 'buffer'.
- * \param[in] ops Allowable transport ops for 'buffer'.
- * \param[out] reg_buf A pointer to a NNTI_buffer_t.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_register_memory (
- const NNTI_transport_t *trans_hdl,
- char *buffer,
- const uint64_t element_size,
- const uint64_t num_elements,
- const NNTI_buf_ops_t ops,
- NNTI_buffer_t *reg_buf);
-
-/**
- * @brief Prepare a list of memory segments for network operations.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] segments List of memory segments.
- * \param[in] segment_lengths List of segment lengths (in bytes).
- * \param[in] num_segments The number of segments in the list.
- * \param[in] ops Allowable transport ops.
- * \param[out] reg_buf A pointer to a NNTI_buffer_t.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_register_segments (
- const NNTI_transport_t *trans_hdl,
- char **segments,
- const uint64_t *segment_lengths,
- const uint64_t num_segments,
- const NNTI_buf_ops_t ops,
- NNTI_buffer_t *reg_buf);
-
-/**
- * @brief Cleanup after network operations are complete.
- *
- * \param[in] reg_buf The buffer to cleanup.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_unregister_memory (
- NNTI_buffer_t *reg_buf);
-
-/**
- * @brief Calculate the number of bytes required to store an encoded NNTI data structure.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] nnti_dt The NNTI data structure cast to void*.
- * \param[out] packed_len The number of bytes required to store the encoded data structure.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_dt_sizeof (
- const NNTI_transport_t *trans_hdl,
- void *nnti_dt,
- uint64_t *packed_len);
-
-/**
- * @brief Encode an NNTI data structure into an array of bytes.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] nnti_dt The NNTI data structure cast to void*.
- * \param[in] packed_buf A array of bytes to store the encoded data structure.
- * \param[in] packed_buflen The length of packed_buf.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_dt_pack (
- const NNTI_transport_t *trans_hdl,
- void *nnti_dt,
- char *packed_buf,
- const uint64_t packed_buflen);
-
-/**
- * @brief Decode an array of bytes into an NNTI datatype.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] nnti_dt The NNTI data structure cast to void*.
- * \param[in] packed_buf A array of bytes containing the encoded data structure.
- * \param[out] packed_len The number of encoded bytes.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_dt_unpack (
- const NNTI_transport_t *trans_hdl,
- void *nnti_dt,
- char *packed_buf,
- uint64_t packed_buflen);
-
-/**
- * @brief Free a variable size NNTI datatype that was unpacked with NNTI_dt_unpack().
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] nnti_dt The NNTI data structure cast to void*.
- */
-NNTI_result_t NNTI_dt_free (
- const NNTI_transport_t *trans_hdl,
- void *nnti_dt);
-
-/**
- * @brief Send a message to a peer.
- *
- * \param[in] peer_hdl The peer to send the message to.
- * \param[in] msg_hdl A buffer containing the message to send.
- * \param[in] dest_hdl A buffer to put the data into.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_send (
- const NNTI_peer_t *peer_hdl,
- const NNTI_buffer_t *msg_hdl,
- const NNTI_buffer_t *dest_hdl,
- NNTI_work_request_t *wr);
-
-/**
- * @brief Transfer data to a peer.
- *
- * \param[in] src_buffer_hdl A buffer containing the data to put.
- * \param[in] src_offset The offset (in bytes) into the src_buffer from which to put.
- * \param[in] src_length The number of bytes to put.
- * \param[in] dest_buffer_hdl A buffer to put the data into.
- * \param[in] dest_offset The offset (in bytes) into the dest at which to put.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_put (
- const NNTI_buffer_t *src_buffer_hdl,
- const uint64_t src_offset,
- const uint64_t src_length,
- const NNTI_buffer_t *dest_buffer_hdl,
- const uint64_t dest_offset,
- NNTI_work_request_t *wr);
-
-/**
- * @brief Transfer data from a peer.
- *
- * \param[in] src_buffer_hdl A buffer containing the data to get.
- * \param[in] src_offset The offset (in bytes) into the src_buffer from which to get.
- * \param[in] src_length The number of bytes to get.
- * \param[in] dest_buffer_hdl A buffer to get the data into.
- * \param[in] dest_offset The offset (in bytes) into the dest at which to get.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_get (
- const NNTI_buffer_t *src_buffer_hdl,
- const uint64_t src_offset,
- const uint64_t src_length,
- const NNTI_buffer_t *dest_buffer_hdl,
- const uint64_t dest_offset,
- NNTI_work_request_t *wr);
-
-/**
- * @brief Transfer data to a peer.
- *
- * \param[in] src_buffer_hdl A buffer containing the data to put.
- * \param[in] src_length The number of bytes to put.
- * \param[in] dest_buffer_list A list of buffers to put the data into.
- * \param[in] dest_count The number of destination buffers.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_scatter (
- const NNTI_buffer_t *src_buffer_hdl,
- const uint64_t src_length,
- const NNTI_buffer_t **dest_buffer_list,
- const uint64_t dest_count,
- NNTI_work_request_t *wr);
-
-
-/**
- * @brief Transfer data from a peer.
- *
- * \param[in] src_buffer_list A list of buffers containing the data to get.
- * \param[in] src_length The number of bytes to get.
- * \param[in] src_count The number of source buffers.
- * \param[in] dest_buffer_hdl A buffer to get the data into.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_gather (
- const NNTI_buffer_t **src_buffer_list,
- const uint64_t src_length,
- const uint64_t src_count,
- const NNTI_buffer_t *dest_buffer_hdl,
- NNTI_work_request_t *wr);
-
-
-/**
- * assign a callback to an atomic variable
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] local_atomic index of the local result variable
- * \param[in] cbfunc callback function invoked when the atomic variable is modified
- * \param[in] context data passed to cbfunc() at every invocation
- *
- * This function assigns a callback to the atomic variable {local_atomic}.
- * {cbfunc} will be invoked after every successful atomic operation on
- * {local_atomic}. Reads are not considered an atomic operation.
- */
-NNTI_result_t NNTI_atomic_set_callback (
- const NNTI_transport_t *trans_hdl,
- const uint64_t local_atomic,
- NNTI_callback_fn_t cbfunc,
- void *context);
-
-/**
- * read a 64-bit value from an local atomic variable
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] local_atomic index of the local atomic variable
- * \param[out] value current value of the atomic variable
- *
- *
- */
-NNTI_result_t NNTI_atomic_read (
- const NNTI_transport_t *trans_hdl,
- const uint64_t local_atomic,
- int64_t *value);
-
-
-/**
- * perform a 64-bit atomic operation with get semantics
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] peer NNTI process that hosts the target atomic variable
- * \param[in] target_atomic index of the target atomic variable
- * \param[in] result_atomic index of the local result atomic variable
- * \param[in] operand 64-bit operand to the atomic operation
- * \param[in] op atomic operation to execute
- * \param[out] wr work request to wait on
- *
- * This function executes an atomic operation with get semantics. When the operation
- * is complete the result of the operation is visible in {target_atomic} and the
- * previous value is visible in {result_atomic}.
- */
-NNTI_result_t NNTI_atomic_fop (
- const NNTI_transport_t *trans_hdl,
- const NNTI_peer_t *peer_hdl,
- const uint64_t target_atomic,
- const uint64_t result_atomic,
- const int64_t operand,
- const NNTI_atomic_op_t op,
- NNTI_work_request_t *wr);
-
-/**
- * perform a 64-bit compare-and-swap operation
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \param[in] peer NNTI process that hosts the target atomic variable
- * \param[in] target_atomic index of the target atomic variable
- * \param[in] result_atomic index of the local result atomic variable
- * \param[in] compare_operand 64-bit operand to compare with
- * \param[in] swap_operand 64-bit operand to swap in
- * \param[out] wr work request to wait on
- *
- * This function executes an atomic operation with get semantics. When the operation
- * is complete the result of the operation is visible in (target_atomic} and the
- * previous value is visible in {result_atomic}.
- */
-NNTI_result_t NNTI_atomic_cswap (
- const NNTI_transport_t *trans_hdl,
- const NNTI_peer_t *peer_hdl,
- const uint64_t target_atomic,
- const uint64_t result_atomic,
- const int64_t compare_operand,
- const int64_t swap_operand,
- NNTI_work_request_t *wr);
-
-
-/**
- * @brief Create a receive work request that can be used to wait for buffer
- * operations to complete.
- *
- */
-NNTI_result_t NNTI_create_work_request (
- NNTI_buffer_t *reg_buf,
- NNTI_work_request_t *wr);
-
-
-/**
- * @brief Disassociates a receive work request from a previous receive
- * and prepares it for reuse.
- *
- */
-NNTI_result_t NNTI_clear_work_request (
- NNTI_work_request_t *wr);
-
-
-/**
- * @brief Disassociates a receive work request from reg_buf.
- *
- */
-NNTI_result_t NNTI_destroy_work_request (
- NNTI_work_request_t *wr);
-
-
-/**
- * @brief Attempts to cancel an NNTI opertion.
- *
- */
-NNTI_result_t NNTI_cancel (
- NNTI_work_request_t *wr);
-
-
-/**
- * @brief Attempts to cancel a list of NNTI opertions.
- *
- */
-NNTI_result_t NNTI_cancelall (
- NNTI_work_request_t **wr_list,
- const uint32_t wr_count);
-
-
-/**
- * @brief Interrupts NNTI_wait*()
- *
- */
-NNTI_result_t NNTI_interrupt (
- const NNTI_transport_t *trans_hdl);
-
-
-/**
- * @brief Wait for a specific buffer to be acted on by a peer.
- *
- * \param[in] reg_buf The buffer that will be acted on by a peer.
- * \param[in] remote_op The remote operation that we expect to occur.
- * \param[in] timeout The amount of time to wait before giving up.
- * \param[out] status The details of the completed (or timed out) operation.
- * \return A result code (NNTI_OK or an error)
- */
-NNTI_result_t NNTI_wait (
- NNTI_work_request_t *wr,
- const int timeout,
- NNTI_status_t *status);
-
-/**
- * @brief Wait for any buffer in the list to be acted on by a peer.
- *
- * \param[in] buf_list The array of buffers that will be acted on by a peer.
- * \param[in] buf_count The number of buffers in the array.
- * \param[in] remote_op The remote operation that we expect to occur.
- * \param[in] timeout The amount of time to wait before giving up.
- * \param[out] which The index of the buffer that completed.
- * \param[out] status The details of the completed (or timed out) operation.
- * \return A result code (NNTI_OK or an error)
- *
- * Caveats: All buffers in buf_list must be registered with the same transport.
- */
-NNTI_result_t NNTI_waitany (
- NNTI_work_request_t **wr_list,
- const uint32_t wr_count,
- const int timeout,
- uint32_t *which,
- NNTI_status_t *status);
-
-/**
- * @brief Wait for all buffers in the list to be acted on by a peer.
- *
- * \param[in] buf_list The array of buffers that will be acted on by a peer.
- * \param[in] buf_count The number of buffers in the array.
- * \param[in] remote_op The remote operation that we expect to occur.
- * \param[in] timeout The amount of time to wait before giving up.
- * \param[out] status The array of statuses that contain the details of the completed (or timed out) operations.
- * \return A result code (NNTI_OK or an error)
- *
- * Caveats: All buffers in buf_list must be registered with the same transport.
- */
-NNTI_result_t NNTI_waitall (
- NNTI_work_request_t **wr_list,
- const uint32_t wr_count,
- const int timeout,
- NNTI_status_t **status);
-
-/**
- * @brief Disable this transport.
- *
- * \param[in] trans_hdl A handle to the configured transport.
- * \return A result code (NNTI_OK or an error)
-*/
-NNTI_result_t NNTI_fini (
- const NNTI_transport_t *trans_hdl);
-
-/** @} */
-
-
-
-
-#if defined(HAVE_TRIOS_INFINIBAND)
-#define NNTI_DEFAULT_TRANSPORT NNTI_TRANSPORT_IB
-#elif defined(HAVE_TRIOS_GEMINI)
-#define NNTI_DEFAULT_TRANSPORT NNTI_TRANSPORT_GEMINI
-#elif defined(HAVE_TRIOS_BGPDCMF)
-#define NNTI_DEFAULT_TRANSPORT NNTI_TRANSPORT_DCMF
-#elif defined(HAVE_TRIOS_BGQPAMI)
-#define NNTI_DEFAULT_TRANSPORT NNTI_TRANSPORT_PAMI
-#elif defined(HAVE_TRIOS_MPI)
-#define NNTI_DEFAULT_TRANSPORT NNTI_TRANSPORT_MPI
-#elif defined(HAVE_TRIOS_PORTALS) || defined(HAVE_TRIOS_CRAYPORTALS)
-#define NNTI_DEFAULT_TRANSPORT NNTI_TRANSPORT_PORTALS
-#else
-#define NSSI_DEFAULT_TRANSPORT NSSI_RPC_LOCAL
-#endif
-
-
-
-
-/**
- * @brief Return TRUE if transport 't' has been successfully initialized.
- */
-#define NNTI_TRANSPORT_INITIALIZED(t)
-/**
- * @brief Return TRUE if buffer 'b' has been filled by the transport.
- */
-#define NNTI_BUFFER_FULL(b)
-/**
- * @brief Return TRUE if buffer 'b' is empty.
- */
-#define NNTI_BUFFER_EMPTY(b)
-/**
- * @brief Return a 'char *' pointer to the payload of buffer 'b'.
- */
-#define NNTI_BUFFER_C_POINTER(b) ((char *)(b)->payload)
-/**
- * @brief Return the size of buffer 'b' in bytes.
- */
-#define NNTI_BUFFER_SIZE(b) (b)->payload_size
-
-/**
- * @brief
- *
- * #define NNTI_INIT_BUFFER(b) \
- (b)->buffer_owner.url=""; \
- (b)->peer.url="";
- */
-#define NNTI_INIT_BUFFER(b) \
- memset((b)->buffer_owner.url, 0, sizeof((b)->buffer_owner.url)); \
- memset((b)->peer.url, 0, sizeof((b)->peer.url));
-
-/**
- * @brief
- * #define NNTI_INIT_PEER(p) \
- (p)->url="";
- */
-#define NNTI_INIT_PEER(p) \
- memset((p)->url, 0, sizeof((p)->url));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* NNTI_H_*/
diff --git a/packages/trios/libraries/nessie/nnti/Trios_nnti_fprint_types.h b/packages/trios/libraries/nessie/nnti/Trios_nnti_fprint_types.h
deleted file mode 100644
index f4111142b4aa..000000000000
--- a/packages/trios/libraries/nessie/nnti/Trios_nnti_fprint_types.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/**
- * @file Trios_nnti_fprint_types.h
- *
- * @brief Pretty print the different NSSI types.
- *
- */
-
-#ifndef _TRIOS_NNTI_FPRINT_TYPES_H_
-#define _TRIOS_NNTI_FPRINT_TYPES_H_
-
-#include
-#include
-#include "Trios_nnti_xdr.h"
-
-
-#if defined(__STDC__) || defined(__cplusplus)
-
-extern const char* nnti_err_str(const int rc);
-
- extern void fprint_NNTI_remote_addr(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_remote_addr_t *addr);
- extern void fprint_NNTI_remote_addr(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_remote_addr_t *addr);
-
- extern void fprint_NNTI_peer(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_peer_t *addr);
- extern void fprint_NNTI_peer(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_peer_t *addr);
-
- extern void fprint_NNTI_buffer(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_buffer_t *addr);
- extern void fprint_NNTI_buffer(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_buffer_t *addr);
-
- extern void fprint_NNTI_status(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_status_t *addr);
- extern void fprint_NNTI_status(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_status_t *addr);
-
-
-#else /* K&R C */
-
-
-#endif /* K&R C */
-
-#endif
diff --git a/packages/trios/libraries/nessie/nnti/Trios_nnti_xdr.x b/packages/trios/libraries/nessie/nnti/Trios_nnti_xdr.x
deleted file mode 100644
index 6ad46768118c..000000000000
--- a/packages/trios/libraries/nessie/nnti/Trios_nnti_xdr.x
+++ /dev/null
@@ -1,865 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*-------------------------------------------------------------------------*/
-/** @file nnti_xdr.x
- *
- * @brief XDR definitions for types used in the NNTI transport interface.
- *
- * @author Todd Kordenbrock (thkorde\@sandia.gov).
- *
- */
-
-#ifdef RPC_HDR
-%#include "Trios_xdr.h"
-%#include
-#endif
-
-#ifdef RPC_XDR
-%#include "Trios_xdr.h"
-%#include
-#endif
-
-
-/** @addtogroup nnti_types
- * @{
- */
-
-/**
- * @brief The \ref nssi_size type is used to for ``size'' variables.
- */
-typedef uint64_t NNTI_size;
-typedef uint64_t NNTI_ssize;
-
-/**
- * @brief Length of a hostname
- */
-const NNTI_HOSTNAME_LEN = 32;
-
-/**
- * @brief Length of a URL
- */
-const NNTI_URL_LEN = 128;
-
-/**
- * @brief The size of a buffer used for receiving requests (should be configurable via URL).
- *
- * This should be a multiple of 64 for best cache performance. 1216=64*19
- */
-const NNTI_REQUEST_BUFFER_SIZE=1216;
-/**
- * @brief The size of a buffer used for receiving results (should be configurable via URL).
- *
- * This should be a multiple of 64 for best cache performance. 1216=64*19
- */
-const NNTI_RESULT_BUFFER_SIZE=1216;
-
-
-enum NNTI_datatype_t {
- NNTI_dt_transport = 1111,
- NNTI_dt_peer = 1112,
- NNTI_dt_buffer = 1113,
- NNTI_dt_work_request = 1114,
- NNTI_dt_status = 1115
-};
-
-
-/**
- * @brief Enumerator of the transport mechanisms supported by NNTI.
- *
- * The \ref NNTI_transport_id_t enumerator provides integer values
- * to represent the supported transport mechanisms.
- */
-enum NNTI_transport_id_t {
- /** @brief No operations permitted. */
- NNTI_TRANSPORT_NULL,
-
- /** @brief Use Portals to transfer rpc requests. */
- NNTI_TRANSPORT_PORTALS,
-
- /** @brief Use Infiniband to transfer rpc requests. */
- NNTI_TRANSPORT_IB,
-
- /** @brief Use Cray Gemini to transfer rpc requests. */
- NNTI_TRANSPORT_GEMINI,
-
- /** @brief Use DCMF for Blue Gene /P transfer rpc requests. */
- NNTI_TRANSPORT_DCMF,
-
- /** @brief Use PAMI for Blue Gene /P transfer rpc requests. */
- NNTI_TRANSPORT_PAMI,
-
- /** @brief Use Cray Gemini to transfer rpc requests. */
- NNTI_TRANSPORT_MPI,
-
- /** @brief Use a local buffer (no remote operations). */
- NNTI_TRANSPORT_LOCAL
-};
-
-/**
- * @brief The number of transport mechanisms supported by NNTI.
- */
-const NNTI_TRANSPORT_COUNT = 8;
-
-
-/**
- * @brief Enumerator of results that NNTI functions could generate.
- *
- * The \ref NNTI_result_t enumerator provides integer values
- * for NNTI function outcomes.
- */
-enum NNTI_result_t {
- /** @brief The function completed successfully. */
- NNTI_OK = 0,
-
- /** @brief Unspecified I/O error. */
- NNTI_EIO = 1001,
-
- /** @brief The size of the message is larger than the supported maximum size. */
- NNTI_EMSGSIZE,
-
- /** @brief The operation or process has been canceled. */
- NNTI_ECANCELED,
-
- /** @brief An operation timed out. */
- NNTI_ETIMEDOUT,
-
- /** @brief The value of the variable or parameter is invalid. */
- NNTI_EINVAL,
-
- /** @brief No memory is available. */
- NNTI_ENOMEM,
-
- /** @brief No such entry. */
- NNTI_ENOENT,
-
- /** @brief Unsupported operation. */
- NNTI_ENOTSUP,
-
- /** @brief The item already exists. */
- NNTI_EEXIST,
-
- /** @brief Unsuccessful RPC operation. */
- NNTI_EBADRPC,
-
- /** @brief Not initialized. */
- NNTI_ENOTINIT,
-
- /** @brief Insufficient priveleges to perform operation. */
- NNTI_EPERM,
-
- /** @brief Either an operation was interrupted by a signal
- * or NNTI_wait() was interrupted by NNTI_interrupt(). */
- NNTI_EINTR,
-
- /** @brief An async operation would have blocked. */
- NNTI_EWOULDBLOCK,
-
- /** @brief The requested resource is temporarily unavailable. Retry later. */
- NNTI_EAGAIN,
-
- /** @brief The request could not be delivered. */
- NNTI_EDROPPED,
-
- /** @brief Error unpacking an NNTI data structure. */
- NNTI_EDECODE,
-
- /** @brief Error packing an NNTI data structure. */
- NNTI_EENCODE
-
-};
-
-
-/**
- * atomic operations that may be implemented by a transport
- */
-enum NNTI_atomic_op_t {
- NNTI_ATOMIC_FADD
-};
-
-
-
-/*********** TCP/IP address types ***********/
-
-/**
- * @brief Binary encoding of a TCP/IP host address.
- *
- * The \ref NNTI_ip_addr type identifies a particular node.
- */
-typedef uint32_t NNTI_ip_addr;
-
-/**
- * @brief TCP port in NBO.
- *
- * The \ref NNTI_tcp_addr type identifies a particular port.
- */
-typedef uint16_t NNTI_tcp_port;
-
-
-/*********** NULL Process Types ***********/
-
-/**
- * @brief Remote process identifier for the NULL transport.
- *
- */
-struct NNTI_null_process_t {
- int i; /* unused, but empty structs are not allowed */
-};
-
-
-/*********** Portals Process Types ***********/
-
-/**
- * @brief Network node identifier (used by Portals).
- *
- * The \ref NNTI_nid type identifies a particular node.
- */
-typedef uint32_t NNTI_nid;
-
-/**
- * @brief Process identifier (used by Portals).
- *
- * The \ref NNTI_pid type identifies a particular process.
- */
-typedef uint32_t NNTI_pid;
-
-/**
- * @brief Remote process identifier for Portals.
- *
- * The \ref NNTI_portals_process_t identifies a particular process
- * on a particular node.
- */
-struct NNTI_portals_process_t {
- /** @brief Portals Node ID. */
- NNTI_nid nid;
- /** @brief Portals Process ID. */
- NNTI_pid pid;
-};
-
-
-/*********** IB Process Types ***********/
-
-/**
- * @brief The queue pair number of an IB connection.
- *
- * The \ref NNTI_qp_num type identifies a particular connection
- * between two IB hosts.
- */
-typedef uint32_t NNTI_qp_num;
-
-/**
- * @brief Remote process identifier for IB.
- *
- * The \ref NNTI_ib_process_t identifies a particular process
- * on a particular node. If a connection has been established to the
- * represented process, then that connection is identified by 'qp_num'.
- */
-struct NNTI_ib_process_t {
-/* /** @brief name on the peer */
-/* string hostname; */
- /** @brief IP address encoded in Network Byte Order */
- NNTI_ip_addr addr;
- /** @brief TCP port encoded in Network Byte Order */
- NNTI_tcp_port port;
- /** @brief IB connection queue pair number */
- NNTI_qp_num qpn;
-};
-
-
-/*********** Gemini Process Types ***********/
-
-/**
- * @brief The instance ID of a Gemini process.
- *
- * The \ref NNTI_inst_id type identifies a particular process
- * within a communication domain.
- */
-typedef uint32_t NNTI_instance_id;
-
-/**
- * @brief Remote process identifier for Gemini.
- *
- * The \ref NNTI_gni_process_t identifies a particular process
- * on a particular node. If a connection has been established to the
- * represented process, then that connection is identified by 'inst_id'.
- */
-struct NNTI_gni_process_t {
- /** @brief IP address encoded in Network Byte Order */
- NNTI_ip_addr addr;
- /** @brief TCP port encoded in Network Byte Order */
- NNTI_tcp_port port;
- /** @brief Gemini process instance ID */
- NNTI_instance_id inst_id;
-};
-
-
-/*********** BG/P DCMF Process Types ***********/
-
-/**
- * @brief Remote process identifier for BG/P DCMF.
- *
- * The \ref NNTI_bgpdcmf_process_t identifies a particular process
- * on a particular node.
- */
-struct NNTI_bgpdcmf_process_t {
- int xcoord;
- int ycoord;
- int zcoord;
- int pset_rank;
-};
-
-
-/*********** BG/Q PAMI Process Types ***********/
-
-/**
- * @brief Remote process identifier for BG/Q PAMI.
- *
- * The \ref NNTI_bgpdcmf_process_t identifies a particular process
- * on a particular node.
- */
-struct NNTI_bgqpami_process_t {
- int pset_rank;
- int taskid;
- int thrid;
-};
-
-
-/*********** MPI Process Types ***********/
-
-/**
- * @brief Remote process identifier for MPI.
- *
- * The \ref NNTI_mpi_process_t identifies a particular process
- * on a particular node.
- */
-struct NNTI_mpi_process_t {
- /** @brief MPI rank. */
- int rank;
-};
-
-
-/*********** Local Process Types ***********/
-
-/**
- * @brief Remote process identifier for the Local transport.
- *
- */
-struct NNTI_local_process_t {
- int i; /* unused, but empty structs are not allowed */
-};
-
-
-/*********** Remote Process Union ***********/
-
-/**
- * @brief A structure to represent a remote processes.
- *
- * The NNTI_remote_process_t structure contains the
- * transport specific info needed to identify a process running
- * on a remote node.
- */
-#if defined(RPC_HDR) || defined(RPC_XDR)
-union NNTI_remote_process_t switch (NNTI_transport_id_t transport_id) {
- /** @brief The NULL representation of a process on the network. */
- case NNTI_TRANSPORT_NULL: NNTI_null_process_t null;
- /** @brief The Portals representation of a process on the network. */
- case NNTI_TRANSPORT_PORTALS: NNTI_portals_process_t portals;
- /** @brief The IB representation of a process on the network. */
- case NNTI_TRANSPORT_IB: NNTI_ib_process_t ib;
- /** @brief The Cray Gemini representation of a process on the network. */
- case NNTI_TRANSPORT_GEMINI: NNTI_gni_process_t gni;
- /** @brief The BGP DCMF library usage on the torus network. */
- case NNTI_TRANSPORT_DCMF: NNTI_bgpdcmf_process_t bgpdcmf;
- /** @brief The BGQ PAMI library usage on the torus network. */
- case NNTI_TRANSPORT_PAMI: NNTI_bgqpami_process_t bgqpami;
- /** @brief The MPI representation of a process on the network. */
- case NNTI_TRANSPORT_MPI: NNTI_mpi_process_t mpi;
- /** @brief The Local representation of a process on the network. */
- case NNTI_TRANSPORT_LOCAL: NNTI_local_process_t local;
-};
-#else
-union NNTI_remote_process_t {
- /** @brief The NULL representation of a process on the network. */
- NNTI_null_process_t null;
- /** @brief The Portals representation of a process on the network. */
- NNTI_portals_process_t portals;
- /** @brief The IB representation of a process on the network. */
- NNTI_ib_process_t ib;
- /** @brief The Cray Gemini representation of a process on the network. */
- NNTI_gni_process_t gni;
- /** @brief The BGPDMA representation of a process on the network. */
- NNTI_bgpdcmf_process_t bgpdcmf;
- /** @brief The BGQPAMI representation of a process on the network. */
- NNTI_bgqpami_process_t bgqpami;
- /** @brief The MPI representation of a process on the network. */
- NNTI_mpi_process_t mpi;
- /** @brief The Local representation of a process on the network. */
- NNTI_local_process_t local;
-};
-#endif
-
-
-/*********** Peer Type ***********/
-
-/**
- * @brief Handle to an NNTI process.
- *
- * This is the datatype used by NNTI clients to reference another process.
- * Use this handle to move data to/from the process.
- */
-struct NNTI_peer_t {
- NNTI_datatype_t datatype;
-
- /** @brief string encoding of a process on the network */
- opaque url[NNTI_URL_LEN];
-
- /** @brief binary encoding of a process on the network */
- NNTI_remote_process_t peer;
-};
-
-
-/*********** NULL RDMA Address Types ***********/
-
-/**
- * @brief RDMA address used for the NULL transport.
- */
-struct NNTI_null_rdma_addr_t {
- int i; /* unused, but empty structs are not allowed */
-};
-
-
-/*********** Portals RDMA Address Types ***********/
-
-/**
- * @brief Definition for match bits in Portals.
- */
-typedef uint64_t NNTI_match_bits;
-
-/**
- * @brief Definition for a remote buffer id.
- */
-enum NNTI_portals_indices {
- NNTI_REQ_PT_INDEX = 1, /* where to send requests */
- NNTI_RECV_PT_INDEX, /* where to receive data */
- NNTI_DATA_PT_INDEX, /* where to put/get data */
- NNTI_LONG_ARGS_PT_INDEX, /* where to fetch long args */
- NNTI_LONG_RES_PT_INDEX /* where to fetch long results */
-};
-
-/**
- * @brief RDMA address used for the Portals implementation.
- */
-struct NNTI_portals_rdma_addr_t {
- /** @brief The memory buffer ID. */
- NNTI_portals_indices buffer_id;
- /** @brief The match bits (required by Portals). */
- NNTI_match_bits match_bits;
- /** @brief Size of the the memory buffer. */
- uint32_t size;
-};
-
-
-/*********** IB RDMA Address Types ***********/
-
-/**
- * @brief RDMA address used for the InfiniBand implementation.
- */
-struct NNTI_ib_rdma_addr_t {
- /** @brief Address of the memory buffer cast to a uint64_t. */
- uint64_t buf;
- /** @brief The key that a remote processes needs to access this buffer. */
- uint32_t key;
- /** @brief Size of the the memory buffer. */
- uint32_t size;
-
- /** @brief Address of the ACK buffer cast to a uint64_t. */
- uint64_t ack_buf;
- /** @brief The key that a remote processes needs to access the ACK buffer. */
- uint32_t ack_key;
- /** @brief Size of the the ACK buffer. */
- uint32_t ack_size;
-};
-
-
-/*********** Gemini RDMA Address Types ***********/
-
-enum NNTI_gni_buffer_type_t {
- NNTI_GNI_RDMA_INITIATOR,
- NNTI_GNI_RDMA_TARGET,
- NNTI_GNI_SEND_SRC,
- NNTI_GNI_REQUEST_BUFFER
-};
-
-struct NNTI_gni_mem_hdl_t {
- uint64_t qword1;
- uint64_t qword2;
-};
-
-/**
- * @brief RDMA address used for the Gemini implementation.
- */
-struct NNTI_gni_rdma_addr_t {
- /** @brief Address of the memory buffer cast to a uint64_t. */
- uint64_t buf;
- /** @brief Size of the the memory buffer. */
- uint32_t size;
- /** @brief The key that a remote processes needs to access this buffer. */
- NNTI_gni_mem_hdl_t mem_hdl;
-
- /** @brief Address of the Work Completion buffer cast to a uint64_t. */
- uint64_t wc_addr;
- /** @brief The key that a remote processes needs to access the Work Completion buffer. */
- NNTI_gni_mem_hdl_t wc_mem_hdl;
-
- /** @brief Identifies the type of buffer (FMA Short Msg or RDMA) */
- NNTI_gni_buffer_type_t type;
-};
-
-
-/*********** BG/P DCMF RDMA Address Types ***********/
-
-struct NNTI_bgpdcmf_memreg_hdl_t {
- unsigned word0;
- unsigned word1;
- unsigned word2;
- unsigned word3;
-};
-
-enum NNTI_bgpdcmf_buffer_type_t {
- NNTI_DCMF_REQUEST_BUFFER,
- NNTI_DCMF_RESULT_BUFFER,
- NNTI_DCMF_SEND_SRC,
- NNTI_DCMF_RECEIVE_DST
-};
-
-/**
- * @brief RDMA address used for the BG/P DCMF implementation.
- */
-struct NNTI_bgpdcmf_rdma_addr_t {
- /** @brief Address of the memory buffer cast to a uint64_t. */
- uint64_t buf;
- /** @brief Size of the the memory buffer. */
- uint32_t size;
- uint32_t owner_rank;
- NNTI_bgpdcmf_buffer_type_t type;
- NNTI_bgpdcmf_memreg_hdl_t mem_hdl;
- uint64_t wc_addr;
- NNTI_bgpdcmf_memreg_hdl_t wc_mem_hdl;
-};
-
-
-/*********** BG/Q PAMI RDMA Address Types ***********/
-
-enum NNTI_bgqpami_buffer_type_t {
- NNTI_PAMI_REQUEST_BUFFER,
- NNTI_PAMI_RESULT_BUFFER,
- NNTI_PAMI_SEND_SRC,
- NNTI_PAMI_RECEIVE_DST
-};
-
-struct NNTI_bgqpami_rdma_addr_t {
- uint64_t buf;
- uint32_t size;
- uint32_t owner_rank;
- NNTI_bgqpami_buffer_type_t type;
- uint64_t mem_hdl;
- uint64_t wc_addr;
- uint64_t wc_mem_hdl;
-};
-
-
-/*********** MPI RDMA Address Types ***********/
-
-/**
- * @brief RDMA address used for the MPI implementation.
- */
-struct NNTI_mpi_rdma_addr_t {
- /** @brief The MPI tag for RTR/RTS msg. */
- NNTI_match_bits cmd_tag;
- /** @brief The MPI tag for GET data msg. */
- NNTI_match_bits get_data_tag;
- /** @brief The MPI tag for PUT data msg. */
- NNTI_match_bits put_data_tag;
- /** @brief Size of the the memory buffer. */
- uint32_t size;
-};
-
-
-/*********** Local RDMA Address Types ***********/
-
-/**
- * @brief RDMA address used for the Local transport.
- */
-struct NNTI_local_rdma_addr_t {
- int i; /* unused, but empty structs are not allowed */
-};
-
-
-/*********** Remote Address Union ***********/
-
-/**
- * @brief A structure to represent a remote memory region.
- *
- * The NNTI_remote_addr_t structure contains the
- * transport specific info needed to identify a memory region
- * on a remote node.
- */
-#if defined(RPC_HDR) || defined(RPC_XDR)
-union NNTI_remote_addr_t switch (NNTI_transport_id_t transport_id) {
- /** @brief The NULL representation of a memory region. */
- case NNTI_TRANSPORT_NULL: NNTI_null_rdma_addr_t null;
- /** @brief The Portals representation of a memory region. */
- case NNTI_TRANSPORT_PORTALS: NNTI_portals_rdma_addr_t portals;
- /** @brief The IB representation of a memory region. */
- case NNTI_TRANSPORT_IB: NNTI_ib_rdma_addr_t ib;
- /** @brief The Cray Gemini representation of a memory region. */
- case NNTI_TRANSPORT_GEMINI: NNTI_gni_rdma_addr_t gni;
- /** @brief The BGP DCMF representation of a memory region. */
- case NNTI_TRANSPORT_DCMF: NNTI_bgpdcmf_rdma_addr_t bgpdcmf;
- /** @brief The BGQ PAMI representation of a memory region. */
- case NNTI_TRANSPORT_PAMI: NNTI_bgqpami_rdma_addr_t bgqpami;
- /** @brief The MPI representation of a memory region. */
- case NNTI_TRANSPORT_MPI: NNTI_mpi_rdma_addr_t mpi;
- /** @brief The Local representation of a memory region. */
- case NNTI_TRANSPORT_LOCAL: NNTI_local_rdma_addr_t local;
-};
-#else
-union NNTI_remote_addr_t {
- /** @brief The NULL representation of a memory region. */
- NNTI_null_rdma_addr_t null;
- /** @brief The Portals representation of a memory region. */
- NNTI_portals_rdma_addr_t portals;
- /** @brief The IB representation of a memory region. */
- NNTI_ib_rdma_addr_t ib;
- /** @brief The Cray Gemini representation of a memory region. */
- NNTI_gni_rdma_addr_t gni;
- /** @brief The BGP DCMF representation of a memory region. */
- NNTI_bgpdcmf_rdma_addr_t bgpdcmf;
- /** @brief The BGQ PAMI representation of a memory region. */
- NNTI_bgqpami_rdma_addr_t bgqpami;
- /** @brief The MPI representation of a memory region. */
- NNTI_mpi_rdma_addr_t mpi;
- /** @brief The Local representation of a memory region. */
- NNTI_local_rdma_addr_t local;
-};
-#endif
-
-/**
- * @brief Array of 16-byte structures that we can send with the request.
- *
- * Rpcgen will use this definition to define encoding functions to
- * encode and decode an array of \ref data_t structures. We will
- * use these functions when sending the array with the request.
- */
-typedef NNTI_remote_addr_t NNTI_remote_addr_array_t<>;
-
-
-
-/*********** Buffer Operations Type ***********/
-
-/**
- * @brief The operations that are permitted on a buffer
- *
- * The NNTI_buf_ops_t enum defines the operations that can be
- * performed on a buffer. These operations can be OR'd together to create
- * a multipurpose buffer.
- */
-enum NNTI_buf_ops_t {
- /** @brief a local process/NIC can read from this buffer */
- NNTI_BOP_LOCAL_READ=1,
- /** @brief a remote process/NIC can read from this buffer */
- NNTI_BOP_REMOTE_READ=2,
- /** @brief a local process/NIC can write to this buffer */
- NNTI_BOP_LOCAL_WRITE=4,
- /** @brief a remote process/NIC can write to this buffer */
- NNTI_BOP_REMOTE_WRITE=8,
- /** @brief operations on this memory generate events that cause work requests to change state */
- NNTI_BOP_WITH_EVENTS=16,
- /** @brief SENDs to this memory occur at the offset+length of the last SEND */
- NNTI_BOP_QUEUING=32,
- /** @brief this buffer has multiple receive slots */
- NNTI_BOP_RECV_QUEUE=64,
- /** @brief this buffer allows atomic operations */
- NNTI_BOP_ATOMICS=128
-};
-
-/** @brief this buffer can be put from */
-%#define NNTI_PUT_SRC ((NNTI_buf_ops_t)(NNTI_BOP_LOCAL_READ|NNTI_BOP_WITH_EVENTS))
-/** @brief this buffer can be put into */
-%#define NNTI_PUT_DST ((NNTI_buf_ops_t)(NNTI_BOP_REMOTE_WRITE))
-/** @brief this buffer can be got from */
-%#define NNTI_GET_SRC ((NNTI_buf_ops_t)(NNTI_BOP_REMOTE_READ))
-/** @brief this buffer can be got into */
-%#define NNTI_GET_DST ((NNTI_buf_ops_t)(NNTI_BOP_LOCAL_WRITE|NNTI_BOP_WITH_EVENTS))
-/** @brief this buffer can be sent from */
-%#define NNTI_SEND_SRC ((NNTI_buf_ops_t)(NNTI_BOP_LOCAL_READ|NNTI_BOP_WITH_EVENTS))
-/** @brief this buffer can be received into */
-%#define NNTI_RECV_DST ((NNTI_buf_ops_t)(NNTI_BOP_REMOTE_WRITE|NNTI_BOP_WITH_EVENTS))
-/** @brief this buffer has multiple receive slots */
-%#define NNTI_RECV_QUEUE ((NNTI_buf_ops_t)(NNTI_BOP_RECV_QUEUE))
-/** @brief this buffer allows atomic operations */
-%#define NNTI_ATOMICS ((NNTI_buf_ops_t)(NNTI_BOP_ATOMICS))
-
-
-/*********** Buffer Type ***********/
-
-/**
- * @brief handle to a memory buffer prepared by NNTI_register_memory
- *
- * The NNTI_buffer_t structure contains the
- * location of a buffer on the network. This is all the info
- * a peer needs to put/get this buffer.
- */
-struct NNTI_buffer_t {
- NNTI_datatype_t datatype;
-
- /** @brief the transport where this buffer is registered */
- NNTI_transport_id_t transport_id;
-
- /** @brief the process in which this buffer resides */
- NNTI_peer_t buffer_owner;
-
- /** @brief Array of remote addresses. Each remote address is a segment of the complete buffer. */
- NNTI_remote_addr_array_t buffer_segments;
-
- /** @brief permitted operations */
- NNTI_buf_ops_t ops;
-
- /** @brief Size of this buffer. */
- uint64_t payload_size;
- /** @brief Local address of the memory buffer cast to a uint64_t. */
- uint64_t payload;
-
- /** @brief Private storage (cast to a uint64_t). */
- uint64_t transport_private;
-};
-
-
-/*********** Work Request Types ***********/
-
-/**
- * @brief handle to a work request prepared by an operation initiator
- *
- */
-struct NNTI_work_request_t {
- NNTI_datatype_t datatype;
-
- /** @brief the transport where this buffer is registered */
- NNTI_transport_id_t transport_id;
-
- /** @brief */
- NNTI_buffer_t *reg_buf;
-
- /** @brief permitted operations */
- NNTI_buf_ops_t ops;
-
- /** @brief operation result */
- NNTI_result_t result;
-
- /** @brief Private storage (cast to a uint64_t). */
- uint64_t transport_private;
-};
-
-
-/*********** Transport Header Type ***********/
-
-/**
- * @brief A header that is prepended to all requests and results.
- *
- */
-struct NNTI_transport_header_t {
- /** @brief a piece of magic to describe the type of message contained in the payload */
- uint32_t message_magic;
- /** @brief some identifier the transport can use to create a thread of messages */
- uint32_t exchange_id;
-};
-
-
-/*********** Status Type ***********/
-
-/**
- * @brief The status of an NNTI operation.
- *
- * The NNTI_status_t structure contains the result of an NNTI buffer
- * operation. The result and op fields will always contain reasonable values.
- * If the operation was successful (result==NNTI_OK), then the remaining
- * fields will also contain reasonable values. If the operation was
- * unsuccessful, then the remaining fields are undefined.
- */
-struct NNTI_status_t {
- NNTI_datatype_t datatype;
-
- /** @brief The operation performed on the buffer. */
- NNTI_buf_ops_t op;
- /** @brief The result code for this operation. */
- NNTI_result_t result;
-
- /** @brief The address of the local buffer used by this operation. */
- uint64_t start;
- /** @brief The offset into the local buffer used by this operation. */
- uint64_t offset;
- /** @brief The number of bytes used by this operation. */
- uint64_t length;
-
- /** @brief The peer that was the data source for this operation. */
- NNTI_peer_t src;
- /** @brief The peer that was the data destination for this operation. */
- NNTI_peer_t dest;
-};
-
-
-/*********** Transport Type ***********/
-
-/**
- * @brief The external representation of a configured transport.
- */
-struct NNTI_transport_t {
- NNTI_datatype_t datatype;
-
- /** @brief The transport id. */
- NNTI_transport_id_t id;
- /** @brief A reference to my process that can be sent to a peer so the peer can contact me. */
- NNTI_peer_t me;
-};
-
-
-/** @} */
diff --git a/packages/trios/libraries/nessie/nnti/buffer_queue.cpp b/packages/trios/libraries/nessie/nnti/buffer_queue.cpp
deleted file mode 100644
index e2563e55c6a0..000000000000
--- a/packages/trios/libraries/nessie/nnti/buffer_queue.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-
-#include "Trios_config.h"
-
-#include "Trios_logger.h"
-#include "buffer_queue.h"
-
-#include "assert.h"
-#include "string.h"
-
-log_level bq_debug_level = LOG_UNDEFINED;
-
-
-static NNTI_result_t create_buffer(
- const NNTI_transport_t *trans_hdl,
- const NNTI_buf_ops_t op,
- const uint32_t buffer_size,
- NNTI_buffer_t **buffer)
-{
- NNTI_result_t nnti_rc;
-// char *b;
-
- log_debug(bq_debug_level, "enter");
-
-// b=(char *)malloc(buffer_size);
-// assert(b);
-// memset(b, 0, buffer_size);
- *buffer=(NNTI_buffer_t *)malloc(sizeof(NNTI_buffer_t));
- assert(*buffer);
- nnti_rc=NNTI_alloc(
- trans_hdl,
- buffer_size,
- 1,
- op,
- *buffer);
- if (nnti_rc != NNTI_OK) {
- log_error(bq_debug_level, "failed registering queue buffer: %d", nnti_rc);
- }
-
- log_debug(bq_debug_level, "exit");
-
- return(nnti_rc);
-}
-
-static NNTI_result_t destroy_buffer(NNTI_buffer_t **buffer)
-{
- NNTI_result_t nnti_rc;
-// char *b;
-
- log_debug(bq_debug_level, "enter");
-
-// b=NNTI_BUFFER_C_POINTER(*buffer);
- nnti_rc=NNTI_free(*buffer);
- if (nnti_rc != NNTI_OK) {
- log_error(bq_debug_level, "failed unregistering queue buffer: %d", nnti_rc);
- }
- free(*buffer);
- *buffer=NULL;
-// free(b);
-
- log_debug(bq_debug_level, "exit");
-
- return(nnti_rc);
-}
-
-int trios_buffer_queue_init(
- trios_buffer_queue_t *bq,
- uint32_t initial_size,
- uint32_t max_size,
- uint8_t create_on_fly,
- NNTI_transport_t *trans_hdl,
- NNTI_buf_ops_t op,
- uint32_t buffer_size)
-{
- NNTI_result_t nnti_rc=NNTI_OK;
- NNTI_buffer_t *buffer=NULL;
-
- log_debug(bq_debug_level, "enter");
-
- if (buffer_size <= 0) {
- log_debug(bq_debug_level, "buffer_size <= 0 - queue not created");
- return((int)nnti_rc);
- }
-
- nthread_lock_init(&bq->mutex);
-
- if (nthread_lock(&bq->mutex)) log_warn(bq_debug_level, "failed to get thread lock");
-
- bq->current_size=0;
- bq->initial_size=initial_size;
- bq->max_size=max_size;
- bq->create_on_fly=create_on_fly;
- bq->trans_hdl=trans_hdl;
- bq->op=op;
- bq->buffer_size=buffer_size;
-
- for (uint32_t i=0;iinitial_size;i++) {
- log_debug(bq_debug_level, "creating queue buffer");
- nnti_rc=create_buffer(
- bq->trans_hdl,
- bq->op,
- bq->buffer_size,
- &buffer);
- if (nnti_rc==NNTI_OK) {
- log_debug(bq_debug_level, "pushing queue buffer");
- bq->queue.push_back(buffer);
- bq->current_size++;
- } else {
- log_error(bq_debug_level, "failed creating queue buffer: %d", nnti_rc);
- break;
- }
- }
- nthread_unlock(&bq->mutex);
-
- log_debug(bq_debug_level, "exit");
-
- return((int)nnti_rc);
-}
-
-NNTI_buffer_t *trios_buffer_queue_pop(
- trios_buffer_queue_t *bq)
-{
- NNTI_result_t nnti_rc=NNTI_OK;
- NNTI_buffer_t *buffer=NULL;
-
- log_debug(bq_debug_level, "enter");
-
- if (nthread_lock(&bq->mutex)) log_warn(bq_debug_level, "failed to get thread lock");
- if (!bq->queue.empty()) {
- log_debug(bq_debug_level, "getting buffer from queue");
- buffer=bq->queue.front();
- bq->queue.pop_front();
- } else {
- if (bq->current_size < bq->max_size) {
- nnti_rc=create_buffer(
- bq->trans_hdl,
- bq->op,
- bq->buffer_size,
- &buffer);
- if (nnti_rc==NNTI_OK) {
- log_debug(bq_debug_level, "expanding buffer queue");
- bq->current_size++;
- } else {
- log_error(bq_debug_level, "failed creating queue buffer to expand the queue: %d", nnti_rc);
- }
- } else if ((bq->current_size == bq->max_size) && (bq->create_on_fly==TRUE)) {
- nnti_rc=create_buffer(
- bq->trans_hdl,
- bq->op,
- bq->buffer_size,
- &buffer);
- if (nnti_rc!=NNTI_OK) {
- log_error(bq_debug_level, "failed creating on the fly queue buffer: %d", nnti_rc);
- buffer=NULL;
- } else {
- log_debug(bq_debug_level, "creating on the fly queue buffer");
- }
- }
- }
- nthread_unlock(&bq->mutex);
-
- log_debug(bq_debug_level, "exit");
-
- return(buffer);
-}
-
-void trios_buffer_queue_push(
- trios_buffer_queue_t *bq,
- NNTI_buffer_t *buffer)
-{
- NNTI_result_t nnti_rc=NNTI_OK;
-
- log_debug(bq_debug_level, "enter");
-
- if (nthread_lock(&bq->mutex)) log_warn(bq_debug_level, "failed to get lock");
- if (bq->queue.size() < bq->max_size) {
- /* when buffers are popped, the size could be reduced to avoid transferring more bytes than necessary */
- log_debug(bq_debug_level, "reset buffer size to bq->buffer_size");
- NNTI_BUFFER_SIZE(buffer)=bq->buffer_size;
- log_debug(bq_debug_level, "returning buffer to queue");
- bq->queue.push_front(buffer);
- } else {
- nnti_rc=destroy_buffer(&buffer);
- if (nnti_rc!=NNTI_OK) {
- log_error(bq_debug_level, "failed destroying on the fly queue buffer: %d", nnti_rc);
- } else {
- log_debug(bq_debug_level, "destroying on the fly queue buffer");
- }
- }
- nthread_unlock(&bq->mutex);
-
- log_debug(bq_debug_level, "exit");
-}
-
-int trios_buffer_queue_fini(
- trios_buffer_queue_t *bq)
-{
- NNTI_result_t nnti_rc=NNTI_OK;
- NNTI_buffer_t *buffer=NULL;
-
- log_debug(bq_debug_level, "enter");
-
- if (nthread_lock(&bq->mutex)) log_warn(bq_debug_level, "failed to get lock");
- if (bq->queue.size() != bq->current_size) {
- log_warn(bq_debug_level, "buffer queue (%p) has missing entries (bq->queue.size(%llu) != bq->current_size(%llu))",
- bq, (uint64_t)bq->queue.size(), (uint64_t)bq->current_size);
- }
- if (bq->queue.size() < bq->initial_size) {
- log_warn(bq_debug_level, "buffer queue (%p) has missing entries (bq->queue.size(%llu) < bq->initial_size(%llu))",
- bq, (uint64_t)bq->queue.size(), (uint64_t)bq->initial_size);
- }
- if (bq->queue.size() > bq->max_size) {
- log_warn(bq_debug_level, "buffer queue (%p) has extra entries (bq->queue.size(%llu) > bq->max_size(%llu))",
- bq, (uint64_t)bq->queue.size(), (uint64_t)bq->max_size);
- }
- while (!bq->queue.empty()) {
- buffer=bq->queue.front();
- bq->queue.pop_front();
- nnti_rc=destroy_buffer(&buffer);
- if (nnti_rc!=NNTI_OK) {
- log_error(bq_debug_level, "failed destroying queue buffer: %d", nnti_rc);
- break;
- }
- }
- nthread_unlock(&bq->mutex);
-
- nthread_lock_fini(&bq->mutex);
-
- log_debug(bq_debug_level, "exit");
-
- return((int)nnti_rc);
-}
diff --git a/packages/trios/libraries/nessie/nnti/buffer_queue.h b/packages/trios/libraries/nessie/nnti/buffer_queue.h
deleted file mode 100644
index 5da22cfa930a..000000000000
--- a/packages/trios/libraries/nessie/nnti/buffer_queue.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/*-------------------------------------------------------------------------*/
-/** @file buffer_queue.h
- *
- * @brief API for a circular list of NNTI_buffer_t.
- *
- * @author Todd Kordenbrock (thkorde\@sandia.gov).
- *
- */
-
-#ifndef _TRIOS_BUFFER_QUEUE_H_
-#define _TRIOS_BUFFER_QUEUE_H_
-
-
-#include "Trios_config.h"
-
-#include "Trios_threads.h"
-
-#include "Trios_nnti.h"
-
-#include
-
-typedef std::deque buffer_queue_t;
-
-typedef struct trios_buffer_queue {
- nthread_lock_t mutex;
- buffer_queue_t queue;
- uint32_t current_size;
- uint32_t initial_size;
- uint32_t max_size;
- uint8_t create_on_fly;
- NNTI_transport_t *trans_hdl;
- NNTI_buf_ops_t op;
- uint32_t buffer_size;
-} trios_buffer_queue_t;
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__STDC__) || defined(__cplusplus)
-
- extern int trios_buffer_queue_init(
- trios_buffer_queue_t *bq,
- uint32_t initial_size,
- uint32_t max_size,
- uint8_t create_on_fly,
- NNTI_transport_t *trans_hdl,
- NNTI_buf_ops_t op,
- uint32_t buffer_size);
- extern NNTI_buffer_t *trios_buffer_queue_pop(
- trios_buffer_queue_t *bq);
- extern void trios_buffer_queue_push(
- trios_buffer_queue_t *bq,
- NNTI_buffer_t *buffer);
- extern int trios_buffer_queue_fini(
- trios_buffer_queue_t *bq);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/packages/trios/libraries/nessie/nnti/cmake/Dependencies.cmake b/packages/trios/libraries/nessie/nnti/cmake/Dependencies.cmake
deleted file mode 100644
index eb56e56d691b..000000000000
--- a/packages/trios/libraries/nessie/nnti/cmake/Dependencies.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-SET(LIB_REQUIRED_DEP_PACKAGES Triossupport)
-SET(LIB_OPTIONAL_DEP_PACKAGES Trioscommsplitter)
-SET(TEST_REQUIRED_DEP_PACKAGES)
-SET(TEST_OPTIONAL_DEP_PACKAGES)
-SET(LIB_REQUIRED_DEP_TPLS)
-SET(LIB_OPTIONAL_DEP_TPLS CrayPortals Portals Gemini InfiniBand BGPDCMF HPCToolkit)
-SET(TEST_REQUIRED_DEP_TPLS)
-SET(TEST_OPTIONAL_DEP_TPLS)
diff --git a/packages/trios/libraries/nessie/nnti/fprint_types.cpp b/packages/trios/libraries/nessie/nnti/fprint_types.cpp
deleted file mode 100644
index 4c700e6fc46a..000000000000
--- a/packages/trios/libraries/nessie/nnti/fprint_types.cpp
+++ /dev/null
@@ -1,480 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/**
- * @file fprint_types.c
- *
- * @brief Pretty print the different NSSI types.
- *
- * @author Ron Oldfield (raoldfi\@sandia.gov).
- * $Revision: 1640 $.
- * $Date: 2007-11-28 11:59:53 -0700 (Wed, 28 Nov 2007) $.
- *
- */
-
-#include
-#include /* find memcpy() */
-#include
-#include
-
-#include "Trios_logger.h"
-#include "Trios_nnti_xdr.h"
-#include "Trios_nnti_fprint_types.h"
-
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE
-#endif
-#include
-
-
-
-/* ----------- Utility functions to output types ---- */
-
-
-
-static const char *myitoa(int val) {
- static char buf[32];
-
- snprintf(buf, sizeof(buf), "%d", val);
- return buf;
-}
-
-/**
- * @brief Output a string associated with a return code.
- *
- * @param rc @input the return code.
- *
- * @returns A string associated with the return code.
- */
-const char *nnti_err_str(int rc)
-{
- switch (rc) {
-
- case NNTI_OK:
- return "NNTI_OK";
-
- /** @brief Unspecified I/O error. */
- case NNTI_EIO:
- return "NNTI_EIO";
-
- /** @brief The size of the message is larger than the supported maximum size. */
- case NNTI_EMSGSIZE:
- return "NNTI_EMSGSIZE";
-
- /** @brief The operation or process has been canceled. */
- case NNTI_ECANCELED:
- return "NNTI_ECANCELED";
-
- /** @brief An operation timed out. */
- case NNTI_ETIMEDOUT:
- return "NNTI_ETIMEDOUT";
-
- /** @brief The value of the variable or parameter is invalid. */
- case NNTI_EINVAL:
- return "NNTI_EINVAL";
-
- /** @brief No memory is available. */
- case NNTI_ENOMEM:
- return "NNTI_ENOMEM";
-
- /** @brief No such entry. */
- case NNTI_ENOENT:
- return "NNTI_ENOENT";
-
- /** @brief Unsupported operation. */
- case NNTI_ENOTSUP:
- return "NNTI_ENOTSUP";
-
- /** @brief The item already exists. */
- case NNTI_EEXIST:
- return "NNTI_EEXIST";
-
- /** @brief Unsuccessful RPC operation. */
- case NNTI_EBADRPC:
- return "NNTI_EBADRPC";
-
- /** @brief Not initialized. */
- case NNTI_ENOTINIT:
- return "NNTI_ENOTINIT";
-
- /** @brief Insufficient priveleges to perform operation. */
- case NNTI_EPERM:
- return "NNTI_EPERM";
-
- default:
- return myitoa(rc);
- }
-}
-
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_remote_addr(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_remote_addr_t *addr)
-{
- char subprefix[100];
-
- snprintf(subprefix, 100, "%s ", prefix);
-
- if (addr == NULL) {
- out << prefix << " " << name << "= NULL" << std::endl;
- return;
- }
-
- log_debug(LOG_ALL, "remote_addr=%p", addr);
-
- /* header */
- out << prefix << " " << name << " = {" << std::endl;
-
- /* contents */
- out << subprefix << " transport_id = " << addr->transport_id << std::endl;
- switch (addr->transport_id) {
- case NNTI_TRANSPORT_PORTALS:
- out << subprefix << " buffer_id = " << addr->NNTI_remote_addr_t_u.portals.buffer_id << std::endl;
- out << subprefix << " match_bits = " << addr->NNTI_remote_addr_t_u.portals.match_bits << std::endl;
- out << subprefix << " size = " << addr->NNTI_remote_addr_t_u.portals.size << std::endl;
- break;
- case NNTI_TRANSPORT_IB:
- out << subprefix << " buf = " << addr->NNTI_remote_addr_t_u.ib.buf << std::endl;
- out << subprefix << " key = " << addr->NNTI_remote_addr_t_u.ib.key << std::endl;
- out << subprefix << " size = " << addr->NNTI_remote_addr_t_u.ib.size << std::endl;
- out << subprefix << " ack_buf = " << addr->NNTI_remote_addr_t_u.ib.ack_buf << std::endl;
- out << subprefix << " ack_size = " << addr->NNTI_remote_addr_t_u.ib.ack_size << std::endl;
- break;
- case NNTI_TRANSPORT_GEMINI:
- out << subprefix << " type = " << addr->NNTI_remote_addr_t_u.gni.type << std::endl;
- out << subprefix << " buf = " << addr->NNTI_remote_addr_t_u.gni.buf << std::endl;
- out << subprefix << " mem_hdl = ("
- << addr->NNTI_remote_addr_t_u.gni.mem_hdl.qword1 << ","
- << addr->NNTI_remote_addr_t_u.gni.mem_hdl.qword2 << ")" << std::endl;
- out << subprefix << " size = " << addr->NNTI_remote_addr_t_u.gni.size << std::endl;
- out << subprefix << " wc_addr = " << addr->NNTI_remote_addr_t_u.gni.wc_addr << std::endl;
- out << subprefix << " wc_mem_hdl = ("
- << addr->NNTI_remote_addr_t_u.gni.wc_mem_hdl.qword1 << ","
- << addr->NNTI_remote_addr_t_u.gni.wc_mem_hdl.qword2 << ")" << std::endl;
- break;
- case NNTI_TRANSPORT_MPI:
- out << subprefix << " cmd_tag = " << addr->NNTI_remote_addr_t_u.mpi.cmd_tag << std::endl;
- out << subprefix << " get_data_tag = " << addr->NNTI_remote_addr_t_u.mpi.get_data_tag << std::endl;
- out << subprefix << " put_data_tag = " << addr->NNTI_remote_addr_t_u.mpi.put_data_tag << std::endl;
- out << subprefix << " size = " << addr->NNTI_remote_addr_t_u.mpi.size << std::endl;
- break;
- case NNTI_TRANSPORT_LOCAL:
- case NNTI_TRANSPORT_NULL:
- break;
- }
-
- /* footer */
- out << subprefix << " }" << std::endl;
-}
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_remote_addr(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_remote_addr_t *addr)
-{
- std::stringstream out(std::stringstream::out);
-
- fprint_NNTI_remote_addr(out, name, prefix, addr);
-
- fprintf(fp, "%s", out.str().c_str());
-}
-
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_remote_addr_array(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_remote_addr_array_t *addr_array)
-{
- char subprefix[100];
-
- snprintf(subprefix, 100, "%s ", prefix);
-
- if (addr_array == NULL) {
- out << prefix << " " << name << "= NULL" << std::endl;
- return;
- }
-
- log_debug(LOG_ALL, "addr_array->NNTI_remote_addr_array_t_len=%d", addr_array->NNTI_remote_addr_array_t_len);
-
- /* header */
- out << prefix << " " << name << " = {" << std::endl;
-
- for (int i=0;iNNTI_remote_addr_array_t_len;i++) {
- fprint_NNTI_remote_addr(out, "buffer_addr", subprefix, &addr_array->NNTI_remote_addr_array_t_val[i]);
- }
-
- /* footer */
- out << subprefix << " }" << std::endl;
-}
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_remote_addr_array(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_remote_addr_array_t *addr_array)
-{
- std::stringstream out(std::stringstream::out);
-
- fprint_NNTI_remote_addr_array(out, name, prefix, addr_array);
-
- fprintf(fp, "%s", out.str().c_str());
-}
-
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_peer(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_peer_t *addr)
-{
- std::string subprefix(prefix);
- subprefix.append(" "); // add two spaces
-
- if (addr == NULL) {
- out << prefix << " " << name << " = NULL " << std::endl;
- return;
- }
-
- /* header */
- out << prefix << " " << name << " = {" << std::endl;
-
- /* contents */
- out << subprefix << " url = " << addr->url << std::endl;
- out << subprefix << " transport_id = " << (int)addr->peer.transport_id << std::endl;
- switch (addr->peer.transport_id) {
- case NNTI_TRANSPORT_PORTALS:
- out << subprefix << " nid = " << addr->peer.NNTI_remote_process_t_u.portals.nid << std::endl;
- out << subprefix << " pid = " << addr->peer.NNTI_remote_process_t_u.portals.pid << std::endl;
- break;
- case NNTI_TRANSPORT_IB:
- out << subprefix << " addr = " << addr->peer.NNTI_remote_process_t_u.ib.addr << std::endl;
- out << subprefix << " port = " << addr->peer.NNTI_remote_process_t_u.ib.port << std::endl;
- out << subprefix << " qpn = " << addr->peer.NNTI_remote_process_t_u.ib.qpn << std::endl;
- break;
- case NNTI_TRANSPORT_GEMINI:
- out << subprefix << " addr = " << addr->peer.NNTI_remote_process_t_u.gni.addr << std::endl;
- out << subprefix << " port = " << addr->peer.NNTI_remote_process_t_u.gni.port << std::endl;
- out << subprefix << " inst_id = " << addr->peer.NNTI_remote_process_t_u.gni.inst_id << std::endl;
- break;
- case NNTI_TRANSPORT_MPI:
- out << subprefix << " rank = " << addr->peer.NNTI_remote_process_t_u.mpi.rank << std::endl;
- break;
- default:
- break;
- }
-
- /* footer */
- out << subprefix << " }" << std::endl;
-}
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_peer(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_peer_t *addr)
-{
- std::stringstream out(std::stringstream::out);
-
- fprint_NNTI_peer(out, name, prefix, addr);
-
- fprintf(fp, "%s", out.str().c_str());
-}
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_buffer(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_buffer_t *addr)
-{
- std::string subprefix(prefix);
- subprefix.append(" "); // add two spaces
-
- if (addr == NULL) {
- out << prefix << " " << name << " = NULL " << std::endl;
- return;
- }
-
- /* header */
- out << prefix << " " << name << " = {" << std::endl;
-
- /* contents */
- out << subprefix << " transport_id = " << addr->transport_id << std::endl;
- fprint_NNTI_peer(out, "buffer_owner", subprefix.c_str(), &addr->buffer_owner);
- fprint_NNTI_remote_addr_array(out, "buffer_segments", subprefix.c_str(), &addr->buffer_segments);
- out << subprefix << " ops = " << addr->ops << std::endl;
- out << subprefix << " payload_size = " << addr->payload_size << std::endl;
- out << subprefix << " payload = " << addr->payload << std::endl;
- out << subprefix << " transport_private = " << addr->transport_private << std::endl;
-
- /* footer */
- out << subprefix << " }" << std::endl;
-}
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_buffer(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_buffer_t *addr)
-{
- std::stringstream out(std::stringstream::out);
-
- fprint_NNTI_buffer(out, name, prefix, addr);
-
- fprintf(fp, "%s", out.str().c_str());
-}
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_status(
- std::ostream &out,
- const char *name,
- const char *prefix,
- const NNTI_status_t *status)
-{
- std::string subprefix(prefix);
- subprefix.append(" "); // add two spaces
-
- if (status == NULL) {
- out << prefix << " " << name << " = NULL " << std::endl;
- return;
- }
-
- /* header */
- out << prefix << " " << name << " = {" << std::endl;
-
- /* contents */
- out << subprefix << " op = " << status->op << std::endl;
- out << subprefix << " result = " << status->result << std::endl;
- out << subprefix << " start = " << status->start << std::endl;
- out << subprefix << " offset = " << status->offset << std::endl;
- out << subprefix << " length = " << status->length << std::endl;
- fprint_NNTI_peer(out, "src", subprefix.c_str(), &status->src);
- fprint_NNTI_peer(out, "dest", subprefix.c_str(), &status->dest);
-
- /* footer */
- out << subprefix << " }" << std::endl;
-}
-
-/**
- * @brief Output the contents of a Portals remote memory descriptor.
- *
- * @param fp File pointer (where to send output)
- * @param prefix Text to put on every line before the output.
- * @param addr The remote memory address.
- */
-void fprint_NNTI_status(
- FILE *fp,
- const char *name,
- const char *prefix,
- const NNTI_status_t *status)
-{
- std::stringstream out(std::stringstream::out);
-
- fprint_NNTI_status(out, name, prefix, status);
-
- fprintf(fp, "%s", out.str().c_str());
-}
diff --git a/packages/trios/libraries/nessie/nnti/nnti.c b/packages/trios/libraries/nessie/nnti/nnti.c
deleted file mode 100644
index 2c7dcb6b62c8..000000000000
--- a/packages/trios/libraries/nessie/nnti/nnti.c
+++ /dev/null
@@ -1,1353 +0,0 @@
-/**
-//@HEADER
-// ************************************************************************
-//
-// Trios: Trilinos I/O Support
-// Copyright 2011 Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "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 SANDIA CORPORATION OR THE
-// 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.
-//
-//Questions? Contact Ron A. Oldfield (raoldfi@sandia.gov)
-//
-// *************************************************************************
-//@HEADER
- */
-/**
- * @file nnti.c
- *
- * @brief nnti.c
- *
- * @author Todd Kordenbrock (thkorde\@sandia.gov).
- * Created on: Jan 13, 2011
- */
-
-#include "Trios_config.h"
-
-#include
-
-#include "Trios_nnti.h"
-#include "nnti_internal.h"
-
-#if defined(HAVE_TRIOS_PORTALS) || defined(HAVE_TRIOS_CRAYPORTALS)
-#include "nnti_ptls.h"
-#endif
-#if defined(HAVE_TRIOS_INFINIBAND)
-#include "nnti_ib.h"
-#endif
-#if defined(HAVE_TRIOS_GEMINI)
-#include "nnti_gni.h"
-#endif
-#if defined(HAVE_TRIOS_BGPDCMF)
-#include "nnti_dcmf.h"
-#endif
-#if defined(HAVE_TRIOS_BGQPAMI)
-#include "nnti_pami.h"
-#endif
-#if defined(HAVE_TRIOS_MPI)
-#include "nnti_mpi.h"
-#endif
-
-#include "Trios_logger.h"
-
-
-
-/* set to LOG_UNDEFINED -- log commands will use default level */
-log_level nnti_debug_level = LOG_UNDEFINED;
-
-
-static NNTI_internal_transport_t available_transports[NNTI_TRANSPORT_COUNT];
-
-
-/**
- * @brief Initialize NNTI to use a specific transport.
- *
- * Enable the use of a particular transport by this process. my_url
- * allows the process to have some control (if possible) over the
- * URL assigned for the transport. For example, a Portals URL to put
- * might be "ptl://-1,128". This would tell Portals to use the default
- * network ID, but use PID=128. If the transport
- * can be initialized without this info (eg. a Portals client), my_url can
- * be NULL or empty.
- *
- */
-NNTI_result_t NNTI_init (
- const NNTI_transport_id_t trans_id,
- const char *my_url,
- NNTI_transport_t *trans_hdl)
-{
- NNTI_result_t rc=NNTI_OK;
- static int8_t first_init=TRUE;
-
- if (first_init==TRUE) {
- memset(&available_transports[0], 0, NNTI_TRANSPORT_COUNT*sizeof(NNTI_internal_transport_t));
- first_init=FALSE;
- }
-
-#if defined(HAVE_TRIOS_PORTALS) || defined(HAVE_TRIOS_CRAYPORTALS)
- if (trans_id == NNTI_TRANSPORT_PORTALS) {
- available_transports[trans_id].initialized = 1;
- available_transports[trans_id].ops.nnti_init_fn = NNTI_ptl_init;
- available_transports[trans_id].ops.nnti_get_url_fn = NNTI_ptl_get_url;
- available_transports[trans_id].ops.nnti_connect_fn = NNTI_ptl_connect;
- available_transports[trans_id].ops.nnti_disconnect_fn = NNTI_ptl_disconnect;
- available_transports[trans_id].ops.nnti_alloc_fn = NNTI_ptl_alloc;
- available_transports[trans_id].ops.nnti_free_fn = NNTI_ptl_free;
- available_transports[trans_id].ops.nnti_register_memory_fn = NNTI_ptl_register_memory;
- available_transports[trans_id].ops.nnti_register_segments_fn = NNTI_ptl_register_segments;
- available_transports[trans_id].ops.nnti_unregister_memory_fn = NNTI_ptl_unregister_memory;
- available_transports[trans_id].ops.nnti_send_fn = NNTI_ptl_send;
- available_transports[trans_id].ops.nnti_put_fn = NNTI_ptl_put;
- available_transports[trans_id].ops.nnti_get_fn = NNTI_ptl_get;
- available_transports[trans_id].ops.nnti_scatter_fn = NNTI_ptl_scatter;
- available_transports[trans_id].ops.nnti_gather_fn = NNTI_ptl_gather;
- available_transports[trans_id].ops.nnti_atomic_set_callback_fn = NNTI_ptl_atomic_set_callback;
- available_transports[trans_id].ops.nnti_atomic_read_fn = NNTI_ptl_atomic_read;
- available_transports[trans_id].ops.nnti_atomic_fop_fn = NNTI_ptl_atomic_fop;
- available_transports[trans_id].ops.nnti_atomic_cswap_fn = NNTI_ptl_atomic_cswap;
- available_transports[trans_id].ops.nnti_create_work_request_fn = NNTI_ptl_create_work_request;
- available_transports[trans_id].ops.nnti_clear_work_request_fn = NNTI_ptl_clear_work_request;
- available_transports[trans_id].ops.nnti_destroy_work_request_fn = NNTI_ptl_destroy_work_request;
- available_transports[trans_id].ops.nnti_cancel_fn = NNTI_ptl_cancel;
- available_transports[trans_id].ops.nnti_cancelall_fn = NNTI_ptl_cancelall;
- available_transports[trans_id].ops.nnti_interrupt_fn = NNTI_ptl_interrupt;
- available_transports[trans_id].ops.nnti_wait_fn = NNTI_ptl_wait;
- available_transports[trans_id].ops.nnti_waitany_fn = NNTI_ptl_waitany;
- available_transports[trans_id].ops.nnti_waitall_fn = NNTI_ptl_waitall;
- available_transports[trans_id].ops.nnti_fini_fn = NNTI_ptl_fini;
- }
-#endif
-#if defined(HAVE_TRIOS_INFINIBAND)
- if (trans_id == NNTI_TRANSPORT_IB) {
- available_transports[trans_id].initialized = 1;
- available_transports[trans_id].ops.nnti_init_fn = NNTI_ib_init;
- available_transports[trans_id].ops.nnti_get_url_fn = NNTI_ib_get_url;
- available_transports[trans_id].ops.nnti_connect_fn = NNTI_ib_connect;
- available_transports[trans_id].ops.nnti_disconnect_fn = NNTI_ib_disconnect;
- available_transports[trans_id].ops.nnti_alloc_fn = NNTI_ib_alloc;
- available_transports[trans_id].ops.nnti_free_fn = NNTI_ib_free;
- available_transports[trans_id].ops.nnti_register_memory_fn = NNTI_ib_register_memory;
- available_transports[trans_id].ops.nnti_register_segments_fn = NNTI_ib_register_segments;
- available_transports[trans_id].ops.nnti_unregister_memory_fn = NNTI_ib_unregister_memory;
- available_transports[trans_id].ops.nnti_send_fn = NNTI_ib_send;
- available_transports[trans_id].ops.nnti_put_fn = NNTI_ib_put;
- available_transports[trans_id].ops.nnti_get_fn = NNTI_ib_get;
- available_transports[trans_id].ops.nnti_scatter_fn = NNTI_ib_scatter;
- available_transports[trans_id].ops.nnti_gather_fn = NNTI_ib_gather;
- available_transports[trans_id].ops.nnti_atomic_set_callback_fn = NNTI_ib_atomic_set_callback;
- available_transports[trans_id].ops.nnti_atomic_read_fn = NNTI_ib_atomic_read;
- available_transports[trans_id].ops.nnti_atomic_fop_fn = NNTI_ib_atomic_fop;
- available_transports[trans_id].ops.nnti_atomic_cswap_fn = NNTI_ib_atomic_cswap;
- available_transports[trans_id].ops.nnti_create_work_request_fn = NNTI_ib_create_work_request;
- available_transports[trans_id].ops.nnti_clear_work_request_fn = NNTI_ib_clear_work_request;
- available_transports[trans_id].ops.nnti_destroy_work_request_fn = NNTI_ib_destroy_work_request;
- available_transports[trans_id].ops.nnti_cancel_fn = NNTI_ib_cancel;
- available_transports[trans_id].ops.nnti_cancelall_fn = NNTI_ib_cancelall;
- available_transports[trans_id].ops.nnti_interrupt_fn = NNTI_ib_interrupt;
- available_transports[trans_id].ops.nnti_wait_fn = NNTI_ib_wait;
- available_transports[trans_id].ops.nnti_waitany_fn = NNTI_ib_waitany;
- available_transports[trans_id].ops.nnti_waitall_fn = NNTI_ib_waitall;
- available_transports[trans_id].ops.nnti_fini_fn = NNTI_ib_fini;
- }
-#endif
-#if defined(HAVE_TRIOS_GEMINI)
- if (trans_id == NNTI_TRANSPORT_GEMINI) {
- available_transports[trans_id].initialized = 1;
- available_transports[trans_id].ops.nnti_init_fn = NNTI_gni_init;
- available_transports[trans_id].ops.nnti_get_url_fn = NNTI_gni_get_url;
- available_transports[trans_id].ops.nnti_connect_fn = NNTI_gni_connect;
- available_transports[trans_id].ops.nnti_disconnect_fn = NNTI_gni_disconnect;
- available_transports[trans_id].ops.nnti_alloc_fn = NNTI_gni_alloc;
- available_transports[trans_id].ops.nnti_free_fn = NNTI_gni_free;
- available_transports[trans_id].ops.nnti_register_memory_fn = NNTI_gni_register_memory;
- available_transports[trans_id].ops.nnti_register_segments_fn = NNTI_gni_register_segments;
- available_transports[trans_id].ops.nnti_unregister_memory_fn = NNTI_gni_unregister_memory;
- available_transports[trans_id].ops.nnti_send_fn = NNTI_gni_send;
- available_transports[trans_id].ops.nnti_put_fn = NNTI_gni_put;
- available_transports[trans_id].ops.nnti_get_fn = NNTI_gni_get;
- available_transports[trans_id].ops.nnti_scatter_fn = NNTI_gni_scatter;
- available_transports[trans_id].ops.nnti_gather_fn = NNTI_gni_gather;
- available_transports[trans_id].ops.nnti_atomic_set_callback_fn = NNTI_gni_atomic_set_callback;
- available_transports[trans_id].ops.nnti_atomic_read_fn = NNTI_gni_atomic_read;
- available_transports[trans_id].ops.nnti_atomic_fop_fn = NNTI_gni_atomic_fop;
- available_transports[trans_id].ops.nnti_atomic_cswap_fn = NNTI_gni_atomic_cswap;
- available_transports[trans_id].ops.nnti_create_work_request_fn = NNTI_gni_create_work_request;
- available_transports[trans_id].ops.nnti_clear_work_request_fn = NNTI_gni_clear_work_request;
- available_transports[trans_id].ops.nnti_destroy_work_request_fn = NNTI_gni_destroy_work_request;
- available_transports[trans_id].ops.nnti_cancel_fn = NNTI_gni_cancel;
- available_transports[trans_id].ops.nnti_cancelall_fn = NNTI_gni_cancelall;
- available_transports[trans_id].ops.nnti_interrupt_fn = NNTI_gni_interrupt;
- available_transports[trans_id].ops.nnti_wait_fn = NNTI_gni_wait;
- available_transports[trans_id].ops.nnti_waitany_fn = NNTI_gni_waitany;
- available_transports[trans_id].ops.nnti_waitall_fn = NNTI_gni_waitall;
- available_transports[trans_id].ops.nnti_fini_fn = NNTI_gni_fini;
- }
-#endif
-#if defined(HAVE_TRIOS_BGPDCMF)
- if (trans_id == NNTI_TRANSPORT_DCMF) {
- available_transports[trans_id].initialized = 1;
- available_transports[trans_id].ops.nnti_init_fn = NNTI_bgpdcmf_init;
- available_transports[trans_id].ops.nnti_get_url_fn = NNTI_bgpdcmf_get_url;
- available_transports[trans_id].ops.nnti_connect_fn = NNTI_bgpdcmf_connect;
- available_transports[trans_id].ops.nnti_disconnect_fn = NNTI_bgpdcmf_disconnect;
- available_transports[trans_id].ops.nnti_alloc_fn = NNTI_bgpdcmf_alloc;
- available_transports[trans_id].ops.nnti_free_fn = NNTI_bgpdcmf_free;
- available_transports[trans_id].ops.nnti_register_memory_fn = NNTI_bgpdcmf_register_memory;
- available_transports[trans_id].ops.nnti_register_segments_fn = NNTI_bgpdcmf_register_segments;
- available_transports[trans_id].ops.nnti_unregister_memory_fn = NNTI_bgpdcmf_unregister_memory;
- available_transports[trans_id].ops.nnti_send_fn = NNTI_bgpdcmf_send;
- available_transports[trans_id].ops.nnti_put_fn = NNTI_bgpdcmf_put;
- available_transports[trans_id].ops.nnti_get_fn = NNTI_bgpdcmf_get;
- available_transports[trans_id].ops.nnti_scatter_fn = NNTI_bgpdcmf_scatter;
- available_transports[trans_id].ops.nnti_gather_fn = NNTI_bgpdcmf_gather;
- available_transports[trans_id].ops.nnti_atomic_set_callback_fn = NNTI_bgpdcmf_atomic_set_callback;
- available_transports[trans_id].ops.nnti_atomic_read_fn = NNTI_bgpdcmf_atomic_read;
- available_transports[trans_id].ops.nnti_atomic_fop_fn = NNTI_bgpdcmf_atomic_fop;
- available_transports[trans_id].ops.nnti_atomic_cswap_fn = NNTI_bgpdcmf_atomic_cswap;
- available_transports[trans_id].ops.nnti_create_work_request_fn = NNTI_bgpdcmf_create_work_request;
- available_transports[trans_id].ops.nnti_clear_work_request_fn = NNTI_bgpdcmf_clear_work_request;
- available_transports[trans_id].ops.nnti_destroy_work_request_fn = NNTI_bgpdcmf_destroy_work_request;
- available_transports[trans_id].ops.nnti_cancel_fn = NNTI_bgpdcmf_cancel;
- available_transports[trans_id].ops.nnti_cancelall_fn = NNTI_bgpdcmf_cancelall;
- available_transports[trans_id].ops.nnti_interrupt_fn = NNTI_bgpdcmf_interrupt;
- available_transports[trans_id].ops.nnti_wait_fn = NNTI_bgpdcmf_wait;
- available_transports[trans_id].ops.nnti_waitany_fn = NNTI_bgpdcmf_waitany;
- available_transports[trans_id].ops.nnti_waitall_fn = NNTI_bgpdcmf_waitall;
- available_transports[trans_id].ops.nnti_fini_fn = NNTI_bgpdcmf_fini;
- }
-#endif
-#if defined(HAVE_TRIOS_BGQPAMI)
- if (trans_id == NNTI_TRANSPORT_PAMI) {
- available_transports[trans_id].initialized = 1;
- available_transports[trans_id].ops.nnti_init_fn = NNTI_bgqpami_init;
- available_transports[trans_id].ops.nnti_get_url_fn = NNTI_bgqpami_get_url;
- available_transports[trans_id].ops.nnti_connect_fn = NNTI_bgqpami_connect;
- available_transports[trans_id].ops.nnti_disconnect_fn = NNTI_bgqpami_disconnect;
- available_transports[trans_id].ops.nnti_alloc_fn = NNTI_bgqpami_alloc;
- available_transports[trans_id].ops.nnti_free_fn = NNTI_bgqpami_free;
- available_transports[trans_id].ops.nnti_register_memory_fn = NNTI_bgqpami_register_memory;
- available_transports[trans_id].ops.nnti_register_segments_fn = NNTI_bgqpami_register_segments;
- available_transports[trans_id].ops.nnti_unregister_memory_fn = NNTI_bgqpami_unregister_memory;
- available_transports[trans_id].ops.nnti_send_fn = NNTI_bgqpami_send;
- available_transports[trans_id].ops.nnti_put_fn = NNTI_bgqpami_put;
- available_transports[trans_id].ops.nnti_get_fn = NNTI_bgqpami_get;
- available_transports[trans_id].ops.nnti_scatter_fn = NNTI_bgqpami_scatter;
- available_transports[trans_id].ops.nnti_gather_fn = NNTI_bgqpami_gather;
- available_transports[trans_id].ops.nnti_atomic_set_callback_fn = NNTI_bgqpami_atomic_set_callback;
- available_transports[trans_id].ops.nnti_atomic_read_fn = NNTI_bgqpami_atomic_read;
- available_transports[trans_id].ops.nnti_atomic_fop_fn = NNTI_bgqpami_atomic_fop;
- available_transports[trans_id].ops.nnti_atomic_cswap_fn = NNTI_bgqpami_atomic_cswap;
- available_transports[trans_id].ops.nnti_create_work_request_fn = NNTI_bgqpami_create_work_request;
- available_transports[trans_id].ops.nnti_clear_work_request_fn = NNTI_bgqpami_clear_work_request;
- available_transports[trans_id].ops.nnti_destroy_work_request_fn = NNTI_bgqpami_destroy_work_request;
- available_transports[trans_id].ops.nnti_cancel_fn = NNTI_bgqpami_cancel;
- available_transports[trans_id].ops.nnti_cancelall_fn = NNTI_bgqpami_cancelall;
- available_transports[trans_id].ops.nnti_interrupt_fn = NNTI_bgqpami_interrupt;
- available_transports[trans_id].ops.nnti_wait_fn = NNTI_bgqpami_wait;
- available_transports[trans_id].ops.nnti_waitany_fn = NNTI_bgqpami_waitany;
- available_transports[trans_id].ops.nnti_waitall_fn = NNTI_bgqpami_waitall;
- available_transports[trans_id].ops.nnti_fini_fn = NNTI_bgqpami_fini;
- }
-#endif
-#if defined(HAVE_TRIOS_MPI)
- if (trans_id == NNTI_TRANSPORT_MPI) {
- available_transports[trans_id].initialized = 1;
- available_transports[trans_id].ops.nnti_init_fn = NNTI_mpi_init;
- available_transports[trans_id].ops.nnti_get_url_fn = NNTI_mpi_get_url;
- available_transports[trans_id].ops.nnti_connect_fn = NNTI_mpi_connect;
- available_transports[trans_id].ops.nnti_disconnect_fn = NNTI_mpi_disconnect;
- available_transports[trans_id].ops.nnti_alloc_fn = NNTI_mpi_alloc;
- available_transports[trans_id].ops.nnti_free_fn = NNTI_mpi_free;
- available_transports[trans_id].ops.nnti_register_memory_fn = NNTI_mpi_register_memory;
- available_transports[trans_id].ops.nnti_register_segments_fn = NNTI_mpi_register_segments;
- available_transports[trans_id].ops.nnti_unregister_memory_fn = NNTI_mpi_unregister_memory;
- available_transports[trans_id].ops.nnti_send_fn = NNTI_mpi_send;
- available_transports[trans_id].ops.nnti_put_fn = NNTI_mpi_put;
- available_transports[trans_id].ops.nnti_get_fn = NNTI_mpi_get;
- available_transports[trans_id].ops.nnti_scatter_fn = NNTI_mpi_scatter;
- available_transports[trans_id].ops.nnti_gather_fn = NNTI_mpi_gather;
- available_transports[trans_id].ops.nnti_atomic_set_callback_fn = NNTI_mpi_atomic_set_callback;
- available_transports[trans_id].ops.nnti_atomic_read_fn = NNTI_mpi_atomic_read;
- available_transports[trans_id].ops.nnti_atomic_fop_fn = NNTI_mpi_atomic_fop;
- available_transports[trans_id].ops.nnti_atomic_cswap_fn = NNTI_mpi_atomic_cswap;
- available_transports[trans_id].ops.nnti_create_work_request_fn = NNTI_mpi_create_work_request;
- available_transports[trans_id].ops.nnti_clear_work_request_fn = NNTI_mpi_clear_work_request;
- available_transports[trans_id].ops.nnti_destroy_work_request_fn = NNTI_mpi_destroy_work_request;
- available_transports[trans_id].ops.nnti_cancel_fn = NNTI_mpi_cancel;
- available_transports[trans_id].ops.nnti_cancelall_fn = NNTI_mpi_cancelall;
- available_transports[trans_id].ops.nnti_interrupt_fn = NNTI_mpi_interrupt;
- available_transports[trans_id].ops.nnti_wait_fn = NNTI_mpi_wait;
- available_transports[trans_id].ops.nnti_waitany_fn = NNTI_mpi_waitany;
- available_transports[trans_id].ops.nnti_waitall_fn = NNTI_mpi_waitall;
- available_transports[trans_id].ops.nnti_fini_fn = NNTI_mpi_fini;
- }
-#endif
-
- trans_hdl->datatype = NNTI_dt_transport;
- trans_hdl->id = trans_id;
-
- rc = available_transports[trans_id].ops.nnti_init_fn(
- trans_id,
- my_url,
- trans_hdl);
-
- return(rc);
-}
-
-
-/**
- * @brief Return the URL field of this transport.
- *
- * Return the URL field of this transport. After initialization, the transport will
- * have a specific location on the network where peers can contact it. The
- * transport will convert this location to a string that other instances of the
- * transport will recognize.
- *
- * URL format: "transport://address/memory_descriptor"
- * - transport - (required) identifies how the URL should parsed
- * - address - (required) uniquely identifies a location on the network
- * - ex. "ptl://nid:pid/", "ib://ip_addr:port"
- * - memory_descriptor - (optional) transport-specific representation of RMA params
- *
- */
-NNTI_result_t NNTI_get_url (
- const NNTI_transport_t *trans_hdl,
- char *url,
- const uint64_t maxlen)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_get_url_fn(
- trans_hdl,
- url,
- maxlen);
- }
-
- return(rc);
-}
-
-/**
- * @brief Prepare for communication with the peer identified by url.
- *
- * Parse url in a transport specific way. Perform any transport specific
- * actions necessary to begin communication with this peer.
- *
- */
-NNTI_result_t NNTI_connect (
- const NNTI_transport_t *trans_hdl,
- const char *url,
- const int timeout,
- NNTI_peer_t *peer_hdl)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_connect_fn(
- trans_hdl,
- url,
- timeout,
- peer_hdl);
- }
-
- peer_hdl->datatype = NNTI_dt_peer;
-
- return(rc);
-}
-
-
-/**
- * @brief Terminate communication with this peer.
- *
- * Perform any transport specific actions necessary to end communication with
- * this peer.
- *
- */
-NNTI_result_t NNTI_disconnect (
- const NNTI_transport_t *trans_hdl,
- NNTI_peer_t *peer_hdl)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_disconnect_fn(
- trans_hdl,
- peer_hdl);
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Allocate a block of memory and prepare it for network operations.
- *
- * Allocate a block of memory in a transport specific way and wrap it in an
- * NNTI_buffer_t. The transport may take additional actions to prepare the
- * memory for network send/receive.
- *
- */
-NNTI_result_t NNTI_alloc (
- const NNTI_transport_t *trans_hdl,
- const uint64_t element_size,
- const uint64_t num_elements,
- const NNTI_buf_ops_t ops,
- NNTI_buffer_t *reg_buf)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_alloc_fn(
- trans_hdl,
- element_size,
- num_elements,
- ops,
- reg_buf);
- }
-
- reg_buf->datatype = NNTI_dt_buffer;
-
- return(rc);
-}
-
-
-/**
- * @brief Cleanup after network operations are complete and release the block
- * of memory.
- *
- * Destroy an NNTI_buffer_t that was previously created by NNTI_alloc().
- *
- */
-NNTI_result_t NNTI_free (
- NNTI_buffer_t *reg_buf)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[reg_buf->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[reg_buf->transport_id].ops.nnti_free_fn(
- reg_buf);
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Prepare a block of memory for network operations.
- *
- * Wrap a user allocated block of memory in an NNTI_buffer_t. The transport
- * may take additional actions to prepare the memory for network send/receive.
- * If the memory block doesn't meet the transport's requirements for memory
- * regions, then errors or poor performance may result.
- *
- */
-NNTI_result_t NNTI_register_memory (
- const NNTI_transport_t *trans_hdl,
- char *buffer,
- const uint64_t element_size,
- const uint64_t num_elements,
- const NNTI_buf_ops_t ops,
- NNTI_buffer_t *reg_buf)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- if (ops == NNTI_BOP_RECV_QUEUE) {
- log_error(nnti_debug_level, "NNTI_BOP_RECV_QUEUE type require the use of NNTI_alloc().");
- rc=NNTI_EINVAL;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_register_memory_fn(
- trans_hdl,
- buffer,
- element_size,
- num_elements,
- ops,
- reg_buf);
- }
- }
-
- reg_buf->datatype = NNTI_dt_buffer;
-
- return(rc);
-}
-
-
-/**
- * @brief Prepare a list of memory segments for network operations.
- *
- * Wrap a list of user allocated memory segments in an NNTI_buffer_t. The
- * transport may take additional actions to prepare the memory segments for
- * network send/receive. If the memory segments don't meet the transport's
- * requirements for memory regions, then errors or poor performance may
- * result.
- *
- */
-NNTI_result_t NNTI_register_segments (
- const NNTI_transport_t *trans_hdl,
- char **segments,
- const uint64_t *segment_lengths,
- const uint64_t num_segments,
- const NNTI_buf_ops_t ops,
- NNTI_buffer_t *reg_buf)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- if (ops == NNTI_BOP_RECV_QUEUE) {
- log_error(nnti_debug_level, "NNTI_BOP_RECV_QUEUE type cannot be segmented.");
- rc=NNTI_EINVAL;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_register_segments_fn(
- trans_hdl,
- segments,
- segment_lengths,
- num_segments,
- ops,
- reg_buf);
- }
- }
-
- reg_buf->datatype = NNTI_dt_buffer;
-
- return(rc);
-}
-
-
-/**
- * @brief Cleanup after network operations are complete.
- *
- * Destroy an NNTI_buffer_t that was previously created by NNTI_regsiter_buffer().
- * It is the user's responsibility to release the the memory region.
- *
- */
-NNTI_result_t NNTI_unregister_memory (
- NNTI_buffer_t *reg_buf)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[reg_buf->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[reg_buf->transport_id].ops.nnti_unregister_memory_fn(
- reg_buf);
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Calculate the number of bytes required to store an encoded NNTI datatype.
- *
- */
-NNTI_result_t NNTI_dt_sizeof (
- const NNTI_transport_t *trans_hdl,
- void *nnti_dt,
- uint64_t *packed_len)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- xdrproc_t sizeof_fn;
- NNTI_datatype_t *dt=(NNTI_datatype_t*)nnti_dt;
-
- switch (*dt) {
- case NNTI_dt_transport:
- sizeof_fn=(xdrproc_t)&xdr_NNTI_transport_t;
- break;
- case NNTI_dt_peer:
- sizeof_fn=(xdrproc_t)&xdr_NNTI_peer_t;
- break;
- case NNTI_dt_buffer:
- sizeof_fn=(xdrproc_t)&xdr_NNTI_buffer_t;
- break;
- case NNTI_dt_work_request:
- sizeof_fn=(xdrproc_t)&xdr_NNTI_work_request_t;
- break;
- case NNTI_dt_status:
- sizeof_fn=(xdrproc_t)&xdr_NNTI_status_t;
- break;
- }
- *packed_len = xdr_sizeof(sizeof_fn, nnti_dt);
- *packed_len += sizeof(NNTI_datatype_t);
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Encode an NNTI datatype into an array of bytes.
- *
- */
-NNTI_result_t NNTI_dt_pack (
- const NNTI_transport_t *trans_hdl,
- void *nnti_dt,
- char *packed_buf,
- uint64_t packed_buflen)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- XDR encode_xdrs;
- xdrproc_t encode_fn;
- NNTI_datatype_t *dt=(NNTI_datatype_t*)nnti_dt;
-
- switch (*dt) {
- case NNTI_dt_transport:
- encode_fn=(xdrproc_t)&xdr_NNTI_transport_t;
- break;
- case NNTI_dt_peer:
- encode_fn=(xdrproc_t)&xdr_NNTI_peer_t;
- break;
- case NNTI_dt_buffer:
- encode_fn=(xdrproc_t)&xdr_NNTI_buffer_t;
- break;
- case NNTI_dt_work_request:
- encode_fn=(xdrproc_t)&xdr_NNTI_work_request_t;
- break;
- case NNTI_dt_status:
- encode_fn=(xdrproc_t)&xdr_NNTI_status_t;
- break;
- }
-
- *(NNTI_datatype_t*)packed_buf = *dt;
-
- packed_buf += sizeof(NNTI_datatype_t);
- packed_buflen -= sizeof(NNTI_datatype_t);
-
- xdrmem_create(
- &encode_xdrs,
- packed_buf,
- packed_buflen,
- XDR_ENCODE);
-
- if (!encode_fn(&encode_xdrs, nnti_dt)) {
- log_fatal(nnti_debug_level,"packing failed");
- return NNTI_EENCODE;
- }
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Decode an array of bytes into an NNTI datatype.
- *
- */
-NNTI_result_t NNTI_dt_unpack (
- const NNTI_transport_t *trans_hdl,
- void *nnti_dt,
- char *packed_buf,
- uint64_t packed_buflen)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- XDR decode_xdrs;
- xdrproc_t decode_fn;
- NNTI_datatype_t *dt=(NNTI_datatype_t*)packed_buf;
- uint64_t dt_size;
-
- switch (*dt) {
- case NNTI_dt_transport:
- decode_fn=(xdrproc_t)&xdr_NNTI_transport_t;
- dt_size=sizeof(NNTI_transport_t);
- break;
- case NNTI_dt_peer:
- decode_fn=(xdrproc_t)&xdr_NNTI_peer_t;
- dt_size=sizeof(NNTI_peer_t);
- break;
- case NNTI_dt_buffer:
- decode_fn=(xdrproc_t)&xdr_NNTI_buffer_t;
- dt_size=sizeof(NNTI_buffer_t);
- break;
- case NNTI_dt_work_request:
- decode_fn=(xdrproc_t)&xdr_NNTI_work_request_t;
- dt_size=sizeof(NNTI_work_request_t);
- break;
- case NNTI_dt_status:
- decode_fn=(xdrproc_t)&xdr_NNTI_status_t;
- dt_size=sizeof(NNTI_status_t);
- break;
- }
-
- packed_buf += sizeof(NNTI_datatype_t);
- packed_buflen -= sizeof(NNTI_datatype_t);
-
- memset(nnti_dt, 0, dt_size);
- xdrmem_create(
- &decode_xdrs,
- packed_buf,
- packed_buflen,
- XDR_DECODE);
- if (!decode_fn(&decode_xdrs, nnti_dt)) {
- log_fatal(nnti_debug_level,"unpacking failed");
- return NNTI_EDECODE;
- }
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Free a variable size NNTI datatype that was unpacked with NNTI_dt_unpack().
- *
- */
-NNTI_result_t NNTI_dt_free (
- const NNTI_transport_t *trans_hdl,
- void *nnti_dt)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- xdrproc_t free_fn;
- NNTI_datatype_t *dt=(NNTI_datatype_t*)nnti_dt;
-
- switch (*dt) {
- case NNTI_dt_transport:
- free_fn=(xdrproc_t)&xdr_NNTI_transport_t;
- break;
- case NNTI_dt_peer:
- free_fn=(xdrproc_t)&xdr_NNTI_peer_t;
- break;
- case NNTI_dt_buffer:
- free_fn=(xdrproc_t)&xdr_NNTI_buffer_t;
- break;
- case NNTI_dt_work_request:
- free_fn=(xdrproc_t)&xdr_NNTI_work_request_t;
- break;
- case NNTI_dt_status:
- free_fn=(xdrproc_t)&xdr_NNTI_status_t;
- break;
- }
-
- xdr_free(free_fn, nnti_dt);
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Send a message to a peer.
- *
- * Send a message (msg_hdl) to a peer (peer_hdl). It is expected that the
- * message is small, but the exact maximum size is transport dependent.
- *
- */
-NNTI_result_t NNTI_send (
- const NNTI_peer_t *peer_hdl,
- const NNTI_buffer_t *msg_hdl,
- const NNTI_buffer_t *dest_hdl,
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[msg_hdl->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[msg_hdl->transport_id].ops.nnti_send_fn(
- peer_hdl,
- msg_hdl,
- dest_hdl,
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Transfer data to a peer.
- *
- * Put the contents of src_buffer_hdl into dest_buffer_hdl. It is
- * assumed that the destination is at least src_length bytes in size.
- *
- */
-NNTI_result_t NNTI_put (
- const NNTI_buffer_t *src_buffer_hdl,
- const uint64_t src_offset,
- const uint64_t src_length,
- const NNTI_buffer_t *dest_buffer_hdl,
- const uint64_t dest_offset,
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[src_buffer_hdl->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[src_buffer_hdl->transport_id].ops.nnti_put_fn(
- src_buffer_hdl,
- src_offset,
- src_length,
- dest_buffer_hdl,
- dest_offset,
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Transfer data from a peer.
- *
- * Get the contents of src_buffer_hdl into dest_buffer_hdl. It is
- * assumed that the destination is at least src_length bytes in size.
- *
- */
-NNTI_result_t NNTI_get (
- const NNTI_buffer_t *src_buffer_hdl,
- const uint64_t src_offset,
- const uint64_t src_length,
- const NNTI_buffer_t *dest_buffer_hdl,
- const uint64_t dest_offset,
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[dest_buffer_hdl->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[dest_buffer_hdl->transport_id].ops.nnti_get_fn(
- src_buffer_hdl,
- src_offset,
- src_length,
- dest_buffer_hdl,
- dest_offset,
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Transfer data to a peer.
- *
- */
-NNTI_result_t NNTI_scatter (
- const NNTI_buffer_t *src_buffer_hdl,
- const uint64_t src_length,
- const NNTI_buffer_t **dest_buffer_list,
- const uint64_t dest_count,
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[src_buffer_hdl->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[src_buffer_hdl->transport_id].ops.nnti_scatter_fn(
- src_buffer_hdl,
- src_length,
- dest_buffer_list,
- dest_count,
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Transfer data from a peer.
- *
- */
-NNTI_result_t NNTI_gather (
- const NNTI_buffer_t **src_buffer_list,
- const uint64_t src_length,
- const uint64_t src_count,
- const NNTI_buffer_t *dest_buffer_hdl,
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[dest_buffer_hdl->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[dest_buffer_hdl->transport_id].ops.nnti_gather_fn(
- src_buffer_list,
- src_length,
- src_count,
- dest_buffer_hdl,
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-NNTI_result_t NNTI_atomic_set_callback (
- const NNTI_transport_t *trans_hdl,
- const uint64_t local_atomic,
- NNTI_callback_fn_t cbfunc,
- void *context)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_atomic_set_callback_fn(
- trans_hdl,
- local_atomic,
- cbfunc,
- context);
- }
-
- return(rc);
-}
-
-
-NNTI_result_t NNTI_atomic_read (
- const NNTI_transport_t *trans_hdl,
- const uint64_t local_atomic,
- int64_t *value)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_atomic_read_fn(
- trans_hdl,
- local_atomic,
- value);
- }
-
- return(rc);
-}
-
-
-NNTI_result_t NNTI_atomic_fop (
- const NNTI_transport_t *trans_hdl,
- const NNTI_peer_t *peer_hdl,
- const uint64_t target_atomic,
- const uint64_t result_atomic,
- const int64_t operand,
- const NNTI_atomic_op_t op,
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_atomic_fop_fn(
- trans_hdl,
- peer_hdl,
- target_atomic,
- result_atomic,
- operand,
- op,
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-NNTI_result_t NNTI_atomic_cswap (
- const NNTI_transport_t *trans_hdl,
- const NNTI_peer_t *peer_hdl,
- const uint64_t target_atomic,
- const uint64_t result_atomic,
- const int64_t compare_operand,
- const int64_t swap_operand,
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_atomic_cswap_fn(
- trans_hdl,
- peer_hdl,
- target_atomic,
- result_atomic,
- compare_operand,
- swap_operand,
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Create a receive work request that can be used to wait for buffer
- * operations to complete.
- *
- */
-NNTI_result_t NNTI_create_work_request (
- NNTI_buffer_t *reg_buf,
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[reg_buf->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[reg_buf->transport_id].ops.nnti_create_work_request_fn(
- reg_buf,
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Disassociates a receive work request from a previous receive
- * and prepares it for reuse.
- *
- */
-NNTI_result_t NNTI_clear_work_request (
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[wr->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[wr->transport_id].ops.nnti_clear_work_request_fn(
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Disassociates a receive work request from reg_buf.
- *
- */
-NNTI_result_t NNTI_destroy_work_request (
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[wr->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[wr->transport_id].ops.nnti_destroy_work_request_fn(
- wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Attempts to cancel an NNTI opertion.
- *
- */
-NNTI_result_t NNTI_cancel (
- NNTI_work_request_t *wr)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[wr->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[wr->transport_id].ops.nnti_cancel_fn(wr);
- }
-
- wr->datatype = NNTI_dt_work_request;
-
- return(rc);
-}
-
-
-/**
- * @brief Attempts to cancel a list of NNTI opertions.
- *
- */
-NNTI_result_t NNTI_cancelall (
- NNTI_work_request_t **wr_list,
- const uint32_t wr_count)
-{
- NNTI_result_t rc=NNTI_OK;
- NNTI_transport_id_t id=NNTI_TRANSPORT_NULL;
- uint32_t i=0;
-
- for (i=0;itransport_id;
- }
- }
-
- if (id == NNTI_TRANSPORT_NULL) {
- rc=NNTI_EINVAL;
- } else {
- if (available_transports[id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[id].ops.nnti_cancelall_fn(
- wr_list,
- wr_count);
- }
- }
-
- for (i=0;idatatype = NNTI_dt_work_request;
- }
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Interrupts NNTI_wait*()
- *
- */
-NNTI_result_t NNTI_interrupt (
- const NNTI_transport_t *trans_hdl)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_interrupt_fn(
- trans_hdl);
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Wait for remote_op on reg_buf to complete.
- *
- * Wait for remote_op on reg_buf to complete or timeout
- * waiting. This is typically used to wait for a result or a bulk data
- * transfer. The timeout is specified in milliseconds. A timeout of -1
- * means wait forever. A timeout of 0 means do not wait.
- *
- */
-NNTI_result_t NNTI_wait (
- NNTI_work_request_t *wr,
- const int timeout,
- NNTI_status_t *status)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[wr->transport_id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[wr->transport_id].ops.nnti_wait_fn(
- wr,
- timeout,
- status);
- }
-
- status->datatype = NNTI_dt_status;
-
- return(rc);
-}
-
-
-/**
- * @brief Wait for remote_op on any buffer in buf_list to complete.
- *
- * Wait for remote_op on any buffer in buf_list to complete or timeout
- * waiting. This is typically used to wait for a result or a bulk data
- * transfer. The timeout is specified in milliseconds. A timeout of -1
- * means wait forever. A timeout of 0 means do not wait.
- *
- * Caveats:
- * 1) All buffers in buf_list must be registered with the same transport.
- * 2) You can't wait on the receive queue and RDMA buffers in the same call. Will probably be fixed in the future.
- *
- */
-NNTI_result_t NNTI_waitany (
- NNTI_work_request_t **wr_list,
- const uint32_t wr_count,
- const int timeout,
- uint32_t *which,
- NNTI_status_t *status)
-{
- NNTI_result_t rc=NNTI_OK;
- NNTI_transport_id_t id=NNTI_TRANSPORT_NULL;
- uint32_t i=0;
-
- for (i=0;itransport_id;
- }
- }
-
- if (id == NNTI_TRANSPORT_NULL) {
- rc=NNTI_EINVAL;
- } else {
- if (available_transports[id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[id].ops.nnti_waitany_fn(
- wr_list,
- wr_count,
- timeout,
- which,
- status);
- }
- }
-
- status->datatype = NNTI_dt_status;
-
- return(rc);
-}
-
-
-/**
- * @brief Wait for remote_op on all buffers in buf_list to complete.
- *
- * Wait for remote_op on all buffers in buf_list to complete or timeout
- * waiting. This is typically used to wait for a result or a bulk data
- * transfer. The timeout is specified in milliseconds. A timeout of -1
- * means wait forever. A timeout of 0 means do not wait.
- *
- * Caveats:
- * 1) All buffers in buf_list must be registered with the same transport.
- * 2) You can't wait on the receive queue and RDMA buffers in the same call. Will probably be fixed in the future.
- *
- */
-NNTI_result_t NNTI_waitall (
- NNTI_work_request_t **wr_list,
- const uint32_t wr_count,
- const int timeout,
- NNTI_status_t **status)
-{
- NNTI_result_t rc=NNTI_OK;
- NNTI_transport_id_t id=NNTI_TRANSPORT_NULL;
- uint32_t i=0;
-
- for (i=0;itransport_id;
- }
- }
-
- if (id == NNTI_TRANSPORT_NULL) {
- rc=NNTI_EINVAL;
- } else {
- if (available_transports[id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[id].ops.nnti_waitall_fn(
- wr_list,
- wr_count,
- timeout,
- status);
- }
- }
-
- for (i=0;idatatype = NNTI_dt_status;
- }
- }
-
- return(rc);
-}
-
-
-/**
- * @brief Disable this transport.
- *
- * Shutdown the transport. Any outstanding sends, gets and puts will be
- * canceled. Any new transport requests will fail.
- *
- */
-NNTI_result_t NNTI_fini (
- const NNTI_transport_t *trans_hdl)
-{
- NNTI_result_t rc=NNTI_OK;
-
- if (available_transports[trans_hdl->id].initialized==0) {
- rc=NNTI_ENOTINIT;
- } else {
- rc = available_transports[trans_hdl->id].ops.nnti_fini_fn(
- trans_hdl);
- memset(&available_transports[trans_hdl->id], 0, sizeof(NNTI_internal_transport_t));
- }
-
- return(rc);
-}
diff --git a/packages/trios/libraries/nessie/nnti/nnti_dcmf.cpp b/packages/trios/libraries/nessie/nnti/nnti_dcmf.cpp
deleted file mode 100644
index 8523c583945d..000000000000
--- a/packages/trios/libraries/nessie/nnti/nnti_dcmf.cpp
+++ /dev/null
@@ -1,3332 +0,0 @@
-/*
- * nnti_dcmf.c
- *
- * Created on: April 19, 2012
- */
-
-#include "Trios_config.h"
-#include "Trios_threads.h"
-#include "Trios_timer.h"
-#include "Trios_signal.h"
-#include "Trios_nnti_fprint_types.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-#include